Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Capturing Results Of A System Commandby Chmrr (Vicar) |
on Sep 23, 2002 at 22:46 UTC ( [id://200248]=note: print w/replies, xml ) | Need Help?? |
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 Section
Seekers of Perl Wisdom
|
|