in reply to Nested foreach
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//; } }
|
|---|