http://www.perlmonks.org?node_id=1025514


in reply to Delete space at the end of a hash element

Ye Olde Fashioned Waye.....

my %newhash; while (my ($k, $v) = each( %hash)) { $k =~ s/\s+$//; $newhash{$k} = $v; } # newhash contains correct key values
A Monk aims to give answers to those who have none, and to learn from those who know more.