in reply to Re^2: Attempting to fill a hash
in thread Attempting to fill a hash

Based on your Data::Dumper output it is clear that you still have newlines at the end of your hash keys. Are you sure you are doing:
chomp; $hashlist{$_} = 1;
or do you have something else?

Replies are listed 'Best First'.
Re^4: Attempting to fill a hash
by almut (Canon) on Jun 06, 2008 at 01:49 UTC
    you still have newlines

    rather looks like carriage returns (\r) to me.

Re^4: Attempting to fill a hash
by parv (Parson) on Jun 06, 2008 at 03:10 UTC
    I wonder if s/\s+$// or similar would have not ended the misery sooner than continued use of chomp (in retrospect, of course).
Re^4: Attempting to fill a hash
by TwistedTransistor (Novice) on Jun 06, 2008 at 01:44 UTC
    Yes, I do. Just an FYI, when I create a blank file from scratch and type in some random words like a b c d e f
    it dumps the correct data, and I can pull up values so I'm begining to think the file i'm using may not be interpreted correctly in perl.