Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^6: Perl bug ?

by choroba (Abbot)
on Feb 06, 2013 at 12:55 UTC ( #1017415=note: print w/ replies, xml ) Need Help??


in reply to Re^5: Perl bug ?
in thread Perl bug ?

what gets really passed is $errors
Why? I would expect the result of the && operation to be passed.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re^6: Perl bug ?
Download Code
Re^7: Perl bug ?
by tinita (Parson) on Feb 06, 2013 at 13:25 UTC
    I would expect the result of the && operation to be passed.
    yes, and the result of something_false && something is something_false. the second part is never processed.
      Oh, I see! Thanks for enlightening me.
      لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
        Maybe the confusing thing is, that not the value of $errors is the result (undef), but $errors itself, so it will be used as an alias to the subroutine. (maybe that wasn't expressed correctly but I hope it's clear what I mean)
      Now I get it, thanks. Agree. That's probably most amazing way to shut yourself 3 times in one line of Perl.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2014-10-26 08:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (152 votes), past polls