Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Checking and verifying a unix command sent in Perl

by ikegami (Pope)
on Jul 19, 2009 at 05:47 UTC ( #781423=note: print w/ replies, xml ) Need Help??


in reply to Checking and verifying a unix command sent in Perl

system already provides the child's exit code as its return value.

$ true $ echo $? 0 $ perl -le'print system("true") >> 8' 0 $ false $ echo $? 1 $ perl -le'print system("false") >> 8' 1

Echoing it and capturing it is a waste.


Comment on Re: Checking and verifying a unix command sent in Perl
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://781423]
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-19 08:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (74 votes), past polls