in reply to Can't get hash keys to print
My guess is that the lines in your input file terminate with a carriage return, but perhaps no line feed, so the hash keys in output are effectively being overwritten by the rest of that line. Try stripping trailling carriage returns ("\r") from the lines when you read them and see if that solves it for you.
Addendum: eg. replace the chomp $row; line with $row =~ s/[\r\n]+$//; or similar.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Can't get hash keys to print
by ikegami (Patriarch) on Aug 24, 2015 at 15:12 UTC | |
|
Re^2: Can't get hash keys to print
by Daren (Initiate) on Aug 24, 2015 at 14:39 UTC |