Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^2: How to get the exit status and the output of the command launched in perl

by sunshine_august (Scribe)
on May 26, 2009 at 10:31 UTC ( #766183=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    [larry@august-dev perl]$ curl --max-time 3 2>&1
    curl: (6) name lookup timed out
    [larry@august-dev perl]$ echo $?
  2. or download this
     use strict;
     my $result = `curl --max-time 3 2>&1`;
     print "exit status: $?\n";
     print "result:\n", $result, "\n";
  3. or download this
    [larry@august-dev perl]$ ./
    exit status: 1536
    curl: (6) name lookup timed out

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://766183]
[erix]: oh well, it's holy week, right? Thick-skin week. I just read that in the Philippines, some RCs practice self-crucifixion. Tough cookies I'd like to see
[LanX]: already?
[erix]: I don't know really. I thought so.
[LanX]: April 16th
[erix]: ah no, 16 april. some time to go yet :)
[LanX]: I hate resurrection ... my back aches
erix practices self-crucifixion but keeps getting get stuck at the one loose hand stage...
LanX has seen this in action ... pope should claim copyright infringement

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (12)
As of 2017-03-23 09:02 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (285 votes). Check out past polls.