I've also added \b assertions around the word that you're ignoring, to prevent strange modifications in the middle of words. --Daveforeach my $line (@words) { $line =~ tr/A-Z/a-z/; foreach my $ignore (@ignore) { $line =~ s/\b$ignore\b//; } }
In reply to Re: Nested foreach
by dpuu
in thread Nested foreach
by esoteric neonate
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |