A basic question maybe, but not silly. There are a couple of things that you need to learn about to solve your problem. You need to be able to iterate over the elements of the array so you should look at map and for loops.
You need to be able to trim the trailing white space off the end of each element and the Perl tool for that is a regular expression substitution. See perlretut and perlre. Regular expressions are a very important part of Perl and repay through study.
In reply to Re: How to delete trailing spaces from array elements?
by GrandFather
in thread How to delete trailing spaces from array elements?
by rcu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |