in reply to How do I dynamically populate a hash after parsing columns from a file
I commented out the
line and changed the two subsequent occurences of IN to DATA (i.e. use the sample data). Worked ok for me too. Your algorythm's fine, this is useful to know and points you further up the script. The question becomes, "Is the input what you think it is?" Is the file your opening actually the file you think it is. For me at least, a common and frustrating state of affairs. :-)open(IN,"CCDS.20090902.txt")...
Perhaps consider what I do in these cases. I put in some debugging code that prints the first 10 lines of the file after its been opened. Add loud delimiters to the start and end of each line, say, ***. This can help identify any issues with white space/new lines etc. Have a good look. Is it, as lostjimmy suggests, empty?
Good luck!
|
|---|