|
|
| Just another Perl shrine | |
| PerlMonks |
Re: weird begginer's problem...by choroba (Prior) |
| on Sep 06, 2012 at 16:16 UTC ( #992132=note: print w/ replies, xml ) | Need Help?? |
|
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.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||