in reply to Capturing Results Of A System Command

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'