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


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

The code I gave you above should do what you are looking for.

perl -e'@cols =qw (field1 fieldband field3 fieldMSTCP okfield5); for ( +@cols) { push(@req,$_) unless /band.*|MSTCP.*/;} print join (",",@req +),$/;' __END__ field1,field3,okfield5

Here i am excluding names with band and MSTCP field names. Since I don't have any field names I am just hard coding it here

. -SK