See the pipe-form of open:
my $cmd = 'netcat localhost 12345 |'; my $pid = open my $netcat, $cmd or die "Couldn't spawn [$cmd]: $!"; for (1..100) { my $line = <$netcat>; print $line; }; END { # Clean up leftover processes kill 9 => $pid if $pid; };
In reply to Re: Using Linux Commands in Perl - `Backticks`
by Corion
in thread Using Linux Commands in Perl - `Backticks`
by ThirtySecondNoob
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |