http://qs1969.pair.com?node_id=481545


in reply to Re^6: Pre-process csv files before using
in thread Pre-process csv files before using

I would check if there are proper values in your @origcols array.

Do something like this before you get into the loop to modify it

map { print $_,$/ } @origcols;
If you see proper output then need to look at other places. Example of your header data will be helpful!

Actually davidrw's grep solution is much cleaner!