http://www.perlmonks.org?node_id=963714


in reply to Why is there only one column in the output file?

One likely reason for the warning message is that line 2148788 of your input file has fewer than 10 tab-separated columns. $fields[9] is probably undefined.

You could open your input file in an editor, go to line 2148788, and check if there are really 10 columns. Or, something in the Basic debugging checklist could help:

warn scalar(@fields), " $.\n";

Updated with code example.

Replies are listed 'Best First'.
Re^2: Why is there only one column in the output file?
by perllearner007 (Acolyte) on Apr 05, 2012 at 20:52 UTC
    Thank you so much it is sorted!