Amit Saxena wrote:
$str= 'GO:0000022  0.00312066574202497 9/2884  1/597   0.0023457  NAmitotic
spindle elongation  YBL084C '

(undef, undef, undef, $var1, $var2) = split (/\s*/, $str);

On Wed, Jun 25, 2008 at 1:20 PM, fadlyemen <[EMAIL PROTECTED]> 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.

Fadl


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/





$str= 'GO:0000022 0.00312066574202497 9/2884 1/597 0.0023457 NAmitotic';

($col4, $col5)=(split/\s+/, $str)[3,4];

print "$col4 $col5";

goksie

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to