Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: weird begginer's problem...

by choroba (Bishop)
on Sep 06, 2012 at 16:16 UTC ( #992132=note: print w/replies, xml ) Need Help??


in reply to weird begginer's problem...

You start with $w == 0. You post-increment it, which means before changing its value, you perform the || die test. Therefore, 0 || die goes the "or" way and dies. Since there was no system failure immediately before the death, the value of $! is meaningless, as documented in Perl Predefined Variables / $OS_ERROR.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://992132]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2017-10-20 18:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (266 votes). Check out past polls.

    Notices?