Hi all
I have an array containing a list of words. Some of the words contain a whitespace at the end, which is fine. I want to replace those elements with more than 1 whitespace at the end.
foreach my $words (@array) { if ($words =~ /(\s\s)$/) { #??? replace with just 1 \s } }
Or is there an easier way? Any help would be appreciated
In reply to Replacing whitespaces with a regex by Dr Manhattan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |