That prints 'free'. See perlref and perlreftut for the [ ] array reference constructor.my @lines = `free`; for (@lines) { push @words, [ split /\s+/, $_ ]; } print $words[0]->[3],"\n";
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
In reply to Re: Splitting output of a system command into an array
by shmem
in thread Splitting output of a system command into an array
by sKiBa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |