I need help in parsing this output:
ENSMUSG00000027831 ENSTBEG00000008938 ortholog_one2one Euthe +ria 56.2942008486563 ENSMUSG00000027831 ENSLAFG00000011038 ortholog_one2one Euther +ia 58.5845347313237 ENSMUSG00000027831 ENSDORG00000014560 ortholog_one2one Sciuro +gnathi 43.9759036144578
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:
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]); }
What is wrong with the code? How can i rectify it. I am not sure with what datatype to use for each value?

In reply to Parsing in perl by Nalababu

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.