Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Delete space at the end of a hash element

by space_monk (Chaplain)
on Mar 26, 2013 at 12:43 UTC ( #1025514=note: print w/ replies, xml ) Need Help??


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.


Comment on Re: Delete space at the end of a hash element
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1025514]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2014-12-23 03:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (134 votes), past polls