Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Eval and system()

by monkfish (Pilgrim)
on Sep 05, 2001 at 17:31 UTC ( [id://110286]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    system("ls") or die $!;
    
  2. or download this
    # Works
    $return = system("ls");
    ...
    if ($return != 0) {
        die ($_);
    }
    
  3. or download this
    eval { system("fake_command) };
    print "$@";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://110286]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-20 04:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found