Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://781423]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2016-12-04 00:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (61 votes). Check out past polls.