system() executes the command specified but it doesn't capture the output of the command.
system() will return the exit status of the command as returned by the 'wait' call.
Use backtick(``) to capture the specified command's output.
my @array = `grep -i "top-" filename | awk '(print $3)'`;In reply to Re: Storing system grep's output to an array in perl
by vinoth.ree
in thread Storing system grep's output to an array in perl
by tc_blr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |