Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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'


Comment on Re: Capturing Results Of A System Command
Download Code

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 about the Monastery: (9)
As of 2014-12-20 13:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls