Maybe because regexes are harder to get right.
If you're not 100% sure that $day will always be between 0 and 6 (and I'm not sure you ever can be!) then you'd be better off with:
print $day, $/ if $day !~ /^(0|6)$/;
Precendence can be a problem :)
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re^2: Short or Long Hand
by davorg
in thread Short or Long Hand
by Scarborough
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |