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.