in reply to Re^2: IO::Pipe hangs
in thread IO::Pipe hangs
Something wrong with Windows implementation?
More of a platform difference -- a thread used instead of a fork.
Use this instead:
use strict; use warnings; my $cmd = "tasklist"; my $pid = open PIPE, "-|", $cmd or die $!; while (my $line = <PIPE> ) { print $line; last if $line =~ /^smss/; } close PIPE;
|
|---|