B
bdm
Hi,
I'm having some trouble doing a pipe-open on Win32.
I suppose I was under the impression that perl
performed some magic when it encounters the '-|',
but it appears to simply pass the string to the
shell:
use strict;
use warnings;
print "Starting...\n";
unless (open (F, '-|')) {
open STDERR, ">&=1";
exec qw/ping localhost/;
die $!;
}
my $buf = "";
while (<F>) {
$buf .= $_;
print "Buffer:\n $buf\n";
}
print "Done!\n";
__END__
Starting...
'-' is not recognized as an internal or external command,
operable program or batch file.
Done!
I'm using Activestate 5.8.4. perlipc didn't suggest platform
specific quirks (unless I missed something) and nor did
the "Windows specific quirks" documentation in my version of
Perl mention pipe opens.
Is it possible to successfully do this type of open on
Windows?
bdm
I'm having some trouble doing a pipe-open on Win32.
I suppose I was under the impression that perl
performed some magic when it encounters the '-|',
but it appears to simply pass the string to the
shell:
use strict;
use warnings;
print "Starting...\n";
unless (open (F, '-|')) {
open STDERR, ">&=1";
exec qw/ping localhost/;
die $!;
}
my $buf = "";
while (<F>) {
$buf .= $_;
print "Buffer:\n $buf\n";
}
print "Done!\n";
__END__
Starting...
'-' is not recognized as an internal or external command,
operable program or batch file.
Done!
I'm using Activestate 5.8.4. perlipc didn't suggest platform
specific quirks (unless I missed something) and nor did
the "Windows specific quirks" documentation in my version of
Perl mention pipe opens.
Is it possible to successfully do this type of open on
Windows?
bdm