Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 cooling their heels in the Monastery: (8)
As of 2015-07-08 08:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (96 votes), past polls