Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: what does "$@" mean?

by skyworld_chen (Acolyte)
on Jan 22, 2013 at 03:16 UTC ( #1014544=note: print w/ replies, xml ) Need Help??


in reply to Re: what does "$@" mean?
in thread what does "$@" mean?

Hi,

thanks for your reply. I have checked "perldoc -v '$@' " at my RHE4 with perl v5.8.5, but it shows "No documents found for '$@' ". I then checked the link you provided (Error Variables) to find an explanation as this:

$@ is set if the string to be eval-ed did not compile (this may happen if open or close were imported with bad prototypes), or if Perl code executed during evaluation die()d. In these cases the value of $@ is the compile error, or the argument to die (which will interpolate $! and $? ).

Is this mean $@ is only used to contain reasons why perl failed? Thanks.


Comment on Re^2: what does "$@" mean?
Re^3: what does "$@" mean?
by AnomalousMonk (Abbot) on Jan 22, 2013 at 03:30 UTC

    The Perl special variable  $@ holds the reason why  eval failed during compilation or execution. See the discussion of eval in perlfunc. Perl failures may have causes that do not originate in eval, and the reasons (actually, error message strings or numeric codes) for these failures are held in other error variables.

Re^3: what does "$@" mean?
by LanX (Canon) on Jan 22, 2013 at 03:43 UTC
    > I have checked "perldoc -v '$@' " at my RHE4 with perl v5.8.5, but it shows "No documents found for '$@' ".

    Neither does 5.10, cause the -v switch was redefined for newer Perl versions!

    But the online doc has variable search, at least for the current versions.

    Cheers Rolf

      Pod::Perldoc, its on cpan, update yours today, get the -v switch

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2014-12-25 23:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls