No such thing as a small change | |
PerlMonks |
Re^2: Process ID of qxby kyle (Abbot) |
on Mar 05, 2007 at 14:16 UTC ( [id://603212]=note: print w/replies, xml ) | Need Help?? |
my $pid = open my $ph, "| $_[0]" or die "$!: $_[0]"; Your open is opening for write instead of read. The command's output goes to STDOUT instead of to your variable. Try this:
Also, you don't have to wait for the command to finish because close does that for you.
In Section
Seekers of Perl Wisdom
|
|