in reply to Re^2: hash question..
in thread hash question..

Please add these 2 lines to your script, then run your script, then post the output of your script so that we may all see the contents of the @line array:
print "line contains:\n"; print Dumper(\@line);

It will be useful for the rest of to know if this is a simple array, or an array of arrays, or an array of hashes, etc. And we will be able to see if there is even a 4th element of the array.

If the File hashes are not too big, please also post their contents.

Also, make sure you are using the strictures (use warnings; use strict;), as these may help to point out undefined or unititialized variables.

Replies are listed 'Best First'.
Re^4: hash question..
by wst (Acolyte) on Nov 22, 2007 at 16:22 UTC
    toolic: I do use warnings;use strict Well it turns out to be even simpler than that. When I was reading from the flat files, (using substr), I somehow have spaces in my key. Thus I was not able to find a match.

    I was not able to see the spaces but when I did (something similiar to what SuicideJunkie suggested.)
    print "{$line[3]}";
    I noticed the spaces and that explained why I was not able to have my if statement be satisfied.

    Thanks for all the help and time to everyone!!