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

This sounds a bit like an XY problem...
The best way to clean up a mess is to not make one in the first place

Why not simply trim the whitespace while you are first building the hash?

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

Replies are listed 'Best First'.
Re^2: Delete space at the end of a hash element
by Laurent_R (Canon) on Mar 26, 2013 at 21:51 UTC
    I fully agree. Clean up the data before you store it in the hash, if you can.