in reply to Trimming whitespaces methods

For a hash, I'd do something like
for (@arr=%hash) { # remove spaces in $_ ... } %hash=@arr;