in reply to Redirecting OUTPUT of system($command) to an array
You can read the output of the command from a filehandle with piped open,
my $pid = open my $sys, '-|', '/usr/local/coms/command' or die $!; my @array = <$sys>; close $sys;
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Redirecting OUTPUT of system($command) to an array
by Anonymous Monk on May 13, 2004 at 19:04 UTC | |
by Zaxo (Archbishop) on May 13, 2004 at 19:15 UTC | |
by Anonymous Monk on May 13, 2004 at 19:23 UTC | |
by Nkuvu (Priest) on May 13, 2004 at 19:29 UTC | |
by Anonymous Monk on Jul 15, 2005 at 15:53 UTC | |
by Anonymous Monk on Jul 15, 2005 at 16:08 UTC |