in reply to hash of arrays

It is because of ^M characters. See

cat -ev yourfile
output

Try adding after first chomp:

s/^M//g;

To write ^M in vim : CTRL-v CTRL-M

Or use dos2unix tool ..

Regards,

Replies are listed 'Best First'.
Re^2: hash of arrays
by Anonymous Monk on Oct 26, 2011 at 10:00 UTC
    Thanks the problem solved by adding this after the chomp.
    s/\r//g;