Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 browsing the Monastery: (3)
As of 2016-04-30 08:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    :nehw tseb si esrever ni gnitirW







    Results (441 votes). Check out past polls.