yes thanx. I am wondering how much perl strong? from today I will give up matlab and start perl
Fadhl M. Al-Akwaa Biomedical Engineering, PhD Student --- On Wed, 6/25/08, Rob Dixon <[EMAIL PROTECTED]> wrote: From: Rob Dixon <[EMAIL PROTECTED]> Subject: Re: how I could do it with perl? To: beginners@perl.org Cc: [EMAIL PROTECTED] Date: Wednesday, June 25, 2008, 4:01 AM Eng. Fadhl Al_Akwaa wrote: > > Hi All > I could not do it with matlab could perl do it? > I appreciate if I have solution for this problem > I try to extract two columns from a text file(8 columns) with variable > number of headerlines, and variable line length. > below is one line of my data > > > S= ‘GO:0000022 0.00312066574202497 9/2884 1/597 0.0023457 NA mitotic > > spindle elongation YBL084C ‘ > > How could I get column 4 , 5 using perl. Does this short Perl program help you? Rob use strict; use warnings; use strict; use warnings; my $s = 'GO:0000022 0.00312066574202497 9/2884 1/597 0.0023457 NA mitotic spindle elongation YBL084C'; my ($col4, $col5) = (split ' ', $s)[3, 4]; print "$_\n" foreach $col4, $col5; **OUTPUT** 1/597 0.0023457