Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Re: Eval and system()

by camelman (Sexton)
on Sep 05, 2001 at 17:13 UTC ( [id://110278]=note: print w/replies, xml ) Need Help??


in reply to Re: Eval and system()
in thread Eval and system()

Sorry about that! I meant:
eval { system("fake_command") }; print $@;
which still doesn't print $@, I guess because of it being caught in the compile phase. Thanks . . . Kevin

Replies are listed 'Best First'.
Re: Re: Re: Eval and system()
by busunsl (Vicar) on Sep 05, 2001 at 17:20 UTC
    It doesn't mean an error in eval when the command in system() fails.

    To check for that you can probably use:

    eval { system("false") and die "command 'false' went wrong!"}; print $@, "\n"

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-19 21:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found