[tpm] eliminating columns from tab delimited files

Alex Mackinnon alexmac131 at hotmail.com
Fri Apr 18 03:45:46 PDT 2008


Sinner!  
 
I agree use awk but in Perl use split and take a slice of the array.
($firstcolumn, $tenth) = (split (/\t/, $string_with_tab))[0,9];
 
 



> Date: Thu, 17 Apr 2008 16:43:05 -0400> From: sfryer at sourcery.ca> To: tpm at to.pm.org> Subject: Re: [tpm] eliminating columns from tab delimited files> > On Thu, Apr 17, 2008 at 04:05:44PM -0400, Omid Gulban wrote:> > does anyone have a quick way of eliminating certain columns from a tab-delimited file.> > I know it's not very Perl'ish, but have you considered using `awk`?> We all love Perl, but sometimes it's overkill. Beyond that, unless> you're experiencing performance issues, I don't see any reason not> to do it the way you described.> > Cheers,> --> Shaun Fryer> cl: 905-920-9209> _______________________________________________> toronto-pm mailing list> toronto-pm at pm.org> http://mail.pm.org/mailman/listinfo/toronto-pm
_________________________________________________________________
Enter today for your chance to win $1000 a day—today until May 12th. Learn more at SignInAndWIN.ca
http://g.msn.ca/ca55/215
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/toronto-pm/attachments/20080418/25685060/attachment.html 


More information about the toronto-pm mailing list