orfor ( @array ) { s/\s\s+$/ / }
since essentially you are testing all the words to see if they fit the pattern anyhow.s/\s\s+$/ / for @array;
In reply to Re: Replacing whitespaces with a regex
by Enlil
in thread Replacing whitespaces with a regex
by Dr Manhattan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |