Hi Monks
I have an array full of words. Some of them ending with ,|?|! etc. I want to remove/substitute these charcters so words like 'what?' just becomes 'what'.
I tried this-
foreach my $word (@array) { $word =~ s/(\.|\?|\!)$//; } foreach my $word (@array) { print "$word\n"; }
but sadly it does not work
In reply to substitute within elements of array by Dr Manhattan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |