use List::MoreUtils qw( apply ); @array = apply { s/\s+\z// } @array;
or
map { s/\s+\z// } @array;
or
s/\s+\z// for @array;
In reply to Re^2: How to delete trailing spaces from array elements?
by ikegami
in thread How to delete trailing spaces from array elements?
by rcu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |