Because Perl is seeing the '*' as regex quantifiers. Use \Q to prevent that.
--if($who =~ /\Q$i/) { print qq(one $i); } else { print qq($i); }
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: foreach loop bug
by davorg
in thread foreach loop bug
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |