strict/warnings will clobber my $b because $a and $b are special variables. Change the name.
Dead wrong, that first guess. Two modifiers, one statement. Rewrite as,
or,$_ eq "b" and $b++ foreach @a ;
for (@a) { $b++ if $_ eq "b"; }
After Compline,
Zaxo
In reply to Re: problem with foreach
by Zaxo
in thread problem with foreach
by jeanluca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |