Hi all
I have a list of words in a hash. I want to delete all the spaces at the end of each element. The element should only consist of characters, no spaces at all.
foreach my $words (keys %hash) { if ($words =~ /( )*$/) { delete $1; } }
Or will this delete the entire element? Any help would be appreciated
In reply to Delete space at the end of a hash element by Dr Manhattan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |