Bill Moseley wrote:
> My test was incomplete. Could you two lines to the test from
> yesterday?
>
> Does that also happen on Win 2000? or WinXP?
>
Done. (I don't have access to Windows XP, and my Windows 2003 Server
does not have Perl at this time.)
P.S. The test code you sent me ove the weekend didn't work. ;-( The scan
"locked up" at the same point each time..
Windows 2000 Server:
ActiveState v5.6.1 Build 638
(note: it does not like the waitpid line.
26: waitpid $pid,0 || warn $!;)
C:\Program Files\SWISH-E\indexes\Tmp>bill_test_1.pl
Name "main::w" used only once: possible typo at C:\Program
Files\SWISH-E\indexes
\Tmp\bill_test_1.pl line 19.
Bad file descriptor at C:\Program
Files\SWISH-E\indexes\Tmp\bill_test_1.pl line
26, <r> line 9.
Pid = 4916
output:
4916 [first arg1]
4916 [second arg2]
4916 [word]
4916 [quoted]
4916 [and]
4916 ["backslashed"]
4916 [word]
4916 [2word quoted and "backslashed" word]
4916 done
done
C:\Program Files\SWISH-E\indexes\Tmp>
C:\Program Files\SWISH-E\indexes\Tmp>bill_test_1.pl
Name "main::w" used only once: possible typo at C:\Program
Files\SWISH-E\indexes
\Tmp\bill_test_1.pl line 19.
Bad file descriptor at C:\Program
Files\SWISH-E\indexes\Tmp\bill_test_1.pl line
26, <r> line 9.
Pid = 3380
output:
3380 [first arg1]
3380 [second arg2]
3380 [word]
3380 [quoted]
3380 [and]
3380 ["backslashed"]
3380 [word]
3380 [2word quoted and "backslashed" word]
3380 done
done
C:\Program Files\SWISH-E\indexes\Tmp>
Windows 2000 Pro:
ActiveState v5.8.0 Build 806
(note: it does not like the waitpid line.
26: waitpid $pid,0 || warn $!;)
E:\scratch\swish-test>perl bill_test_1.pl
Name "main::w" used only once: possible typo at bill_test_1.pl line 16.
Pid = 2108
output:
2108 [first arg1]
2108 [second arg2]
2108 [word]
2108 [quoted]
2108 [and]
2108 ["backslashed"]
2108 [word]
2108 [2word quoted and "backslashed" word]
2108 done
done
Bad file descriptor at bill_test_1.pl line 26, <r> line 9.
E:\scratch\swish-test>perl bill_test_1.pl
Name "main::w" used only once: possible typo at bill_test_1.pl line 16.
Pid = 2104
output:
2104 [first arg1]
2104 [second arg2]
2104 [word]
2104 [quoted]
2104 [and]
2104 ["backslashed"]
2104 [word]
2104 [2word quoted and "backslashed" word]
2104 done
done
Bad file descriptor at bill_test_1.pl line 26, <r> line 9.
bill_test_1.pl
#!/usr/bin/perl -w
use strict;
use IPC::Open2;
#my @command = ( 'perl', 'my bill_test_2.pl', 'first arg1', '"second
arg2"' );
my @command = (
'perl',
'my bill_test_2.pl',
'first arg1',
'"second arg2"',
'word "quoted" and \"backslashed\" word',
'"2word "quoted" and \"backslashed\" word"',
);
my $pid = IPC::Open2::open2( \*r, \*w, @command );
print "Pid = $pid\n";
print "output:\n";
print while $_ = <r>;
print "done\n";
waitpid $pid,0 || warn $!;
Received on Tue Sep 28 09:43:01 2004