Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Capturing Results Of A System Command

by Chmrr (Vicar)
on Sep 23, 2002 at 22:46 UTC ( #200248=note: print w/replies, xml ) Need Help??


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'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://200248]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2016-09-25 23:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (473 votes). Check out past polls.