Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: Using eval: $@ isn't returning the error I expect

by haukex (Archbishop)
on Feb 20, 2020 at 00:08 UTC ( [id://11113207]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Using eval: $@ isn't returning the error I expect
in thread [SOLVED] Using eval: $@ isn't returning the error I expect

The $ perl -le ... indicates that this is a command typed at the command line (as a demo), not something you should simply copy & paste into your script as a whole line - the code is inside the single quotes after the -e switch here (see also perlrun).

Replies are listed 'Best First'.
Re^4: Using eval: $@ isn't returning the error I expect
by doctormelodious (Acolyte) on Feb 20, 2020 at 00:48 UTC
    D'oh! Of course, that was a command line command... And yes, I did try just the part in single quotes in my script. Finally figured out via another comment here that it needed to go into a BEGIN block, due to the nature of its use on the host server. Problem solved. Thanks!

Log In?
Username:
Password:

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

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

    No recent polls found