This is a FAQ. You want to use backticks, like so:
$chksum = `cksum $file`;..the standard caveats about being careful about special characters in $file apply.
perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'
In reply to Re: Capturing Results Of A System Command
by Chmrr
in thread Capturing Results Of A System Command
by heezy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |