in reply to problem with foreach
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
|
|---|