When you want to capture output, use backticks
my $val = `ls -lrt`;
or
my $val = qx/ls -lrt/;
Ref: perlop
In reply to Re: how to store values from system command
by ikegami
in thread how to store values from system command
by veeruch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |