pipe-open on win32

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top