but sadly it does not work
Sure it does
@array = qw[ SURE! IT! DOES! ]; foreach my $word (@array) { $word =~ s/(\.|\?|\!)$//; } die "@array"; __END__ SURE IT DOES at - line 6.
What is the reason you didn't post your @array?
In reply to Re: substitute within elements of array
by Anonymous Monk
in thread substitute within elements of array
by Dr Manhattan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |