lazy has asked for the wisdom of the Perl Monks concerning the following question:
how to delete a column name from file actual file would be like this i'm using Tie::File to write it as an array of columns, columns are written seperately and so the data
col1,col2,col3,col4,col5,col6
33,12dxc,fvgdf,dfgv,sdfvd
22,12cvb,gfbsd,fddg,fdvdf
22,12cvb,gfbsd,fddg,fdvdf
22,12cvb,gfbsd,fddg,fdvdf
22,12cvb,gfbsd,fddg,fdvdf
expected is
col1,col2,col3,col4,col5
33,12dxc,fvgdf,dfgv,sdfvd
22,12cvb,gfbsd,fddg,fdvdf
22,12cvb,gfbsd,fddg,fdvdf
22,12cvb,gfbsd,fddg,fdvdf
22,12cvb,gfbsd,fddg,fdvdf
open (MYFILE, "$filename"); $ColumnNames = <MYFILE>; $array[0] = $ColumnNames;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Deleting a Column name from file
by hippo (Archbishop) on Jul 16, 2014 at 08:52 UTC | |
|
Re: Deleting a Column name from file
by Anonymous Monk on Jul 16, 2014 at 08:52 UTC | |
|
Re: Deleting a Column name from file
by Anonymous Monk on Jul 16, 2014 at 08:55 UTC | |
by lazy (Novice) on Jul 16, 2014 at 13:13 UTC | |
by Anonymous Monk on Jul 16, 2014 at 21:06 UTC | |
|
Re: Deleting a Column name from file
by Anonymous Monk on Jul 16, 2014 at 16:38 UTC |