Nalababu has asked for the wisdom of the Perl Monks concerning the following question:
and getting the value greater than 50.000 and printing that entry separately. this is my program i wrote but im getting error uninitialized value in split:ENSMUSG00000027831 ENSTBEG00000008938 ortholog_one2one Euthe +ria 56.2942008486563 ENSMUSG00000027831 ENSLAFG00000011038 ortholog_one2one Euther +ia 58.5845347313237 ENSMUSG00000027831 ENSDORG00000014560 ortholog_one2one Sciuro +gnathi 43.9759036144578
What is wrong with the code? How can i rectify it. I am not sure with what datatype to use for each value?use strict; use warnings; use Getopt::std; my $le = "lethal_results.txt"; open(LE , "<", $le) or die ("Unable to open file $le: $!"); my @le_data = <LE>; my $le_data; close (LE); for( my$i=1; $i<= @le_data; $i++) { my @line = split(/\s+/,$le_data[$i]); my $width = 11; if(@le_data[5] >= 50.000) { my $data = $le_data[$i]; chomp $data; printf("%s%${width}s%${width}s%\t\t%.6g\n", $le_data[1],$le_data[2],$l +e_data[4],$le_data[6]); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Parsing in perl
by ikegami (Patriarch) on Jun 09, 2009 at 15:43 UTC | |
Re: Parsing in perl
by McDarren (Abbot) on Jun 09, 2009 at 16:05 UTC | |
Re: Parsing in perl
by almut (Canon) on Jun 09, 2009 at 15:42 UTC | |
Re: Parsing in perl
by arc_of_descent (Hermit) on Jun 09, 2009 at 15:36 UTC | |
Re: Parsing in perl
by ambrus (Abbot) on Jun 09, 2009 at 15:26 UTC | |
Re: Parsing in perl
by Bloodnok (Vicar) on Jun 09, 2009 at 15:20 UTC | |
Re: Parsing in perl
by wazoox (Prior) on Jun 09, 2009 at 15:29 UTC | |
Re: Parsing in perl
by DStaal (Chaplain) on Jun 09, 2009 at 15:51 UTC | |
Re: Parsing in perl
by Anonymous Monk on Jun 09, 2009 at 16:24 UTC | |
Re: Parsing in perl
by bichonfrise74 (Vicar) on Jun 10, 2009 at 05:16 UTC | |
Re: Parsing in perl
by ikegami (Patriarch) on Jun 09, 2009 at 15:44 UTC |