Perl-Sensitive Sunglasses | |
PerlMonks |
Re^2: my 'if' condition doesn't work, why?by perltux (Monk) |
on Nov 11, 2014 at 22:00 UTC ( [id://1106899]=note: print w/replies, xml ) | Need Help?? |
This looks like the 'nicest' (from a code readability and compactness point of view) solution to me, shame that it's not standard Perl but instead requires an extra module. So I have chosen to use if ($n==40 || $n==47 || $n==76) { which works fine too (regardless whether I use 'or' or '||'). Many thanks to all who replied for your help.
In Section
Seekers of Perl Wisdom
|
|