s/\s+$// for (@arr1);With a for loop in modifier mode, you don't need the parens. The code gets just a little bit tidier that way (IMO of course).
s/\s+$// for @arr1;
In reply to Re^2: How to delete trailing spaces from array elements?
by bart
in thread How to delete trailing spaces from array elements?
by rcu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |