Output from Perl script in Cygwin

Help with setting up and configuring custom user tools in UltraEdit (based on command line input)

Output from Perl script in Cygwin

Postby bhodges » Tue Jun 21, 2005 5:48 am

I can't seem to capture any output when I run perl scripts under Cygwin.
I've tried:
1. Launch ue from cygwin shell
2. I define a specific cygwin 'perl' with:
Command line: C:/cygwin/bin/perl %F
Working Directory: %P
Create new file: Yes
Capture output: Yes
Show DOS box: Yes

3. Use the alternate output capture option
4. Run the following simple perl script:
my @dirs = glob "*.*";
open OUT , "> ./out";
print STDOUT "~~ Arrghh! @dirs ~~\n";
print OUT "~~ Arrghh! @dirs ~~\n";
close OUT;
open OUT , "< ./out";
while (<OUT>)
{
print "$_";
}
sleep 3;

The './out' file gets created OK and has the appropriate output. However no output gets captured from the "print STDOUT ..." line.

If I use ActiveState perl & don't use alternate capture the output *does* get captured.
I've configured a simple command that uses the cygwin version of 'ls'. Output is captured.

It appears that there is some problem with the collection of the stdout from a perl script.

Any ideas?

Thanks.
User avatar
bhodges
Newbie
 
Posts: 3
Joined: Wed Aug 24, 2005 11:00 pm

Re: Output from Perl script in Cygwin

Postby bhodges » Wed Jun 22, 2005 10:54 am

Well I've managed to answer my own question.

All I needed to do was:
1. set up a .bat file to run the cygwin perl e.g.
@echo off
C:\cygwin\bin\perl %1

2. Add a command to run this batch file via tool config
3. Don't use alternate capture

& hey presto the output is captured.

Incidentally it seems to make no difference whether ue is launched from a cygwin shell or not.
User avatar
bhodges
Newbie
 
Posts: 3
Joined: Wed Aug 24, 2005 11:00 pm


Return to Custom User Tools/Tool Configuration