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.
|
---|
In Section
Seekers of Perl Wisdom