ORF                                        PHAGE_NAME              START     END     Hvalue
***************************************************************************************************************
orf00007                    PHAGE_Prochl_MED4_213_NC_020845-gi|472340344|ref|YP_007673870.1|     7665 8618    0.210897481636936
orf00007                    PHAGE_Prochl_P_HM2_NC_015284-gi|326783200|ref|YP_004323597.1|        7665 8618    0.207761175236097
orf00007                    PHAGE_Prochl_P_HM1_NC_015280-gi|326782251|ref|YP_004322652.1|        7665 8618    0.207761175236097
orf00007                    PHAGE_Prochl_Syn1_NC_015288-gi|326784174|ref|YP_004324567.1|         7665 8618    0.176257712486884
orf00007                    PHAGE_Cyanop_P_RSM6_NC_020855-gi|472341546|ref|YP_007675062.1|       7665 8618    0.201443231899265
orf00007                    PHAGE_Synech_syn9_NC_008296-gi|113200706|ref|YP_717869.1|            7665 8618    0.188906505771249



1. ignore 1st and 2nd line
2. Take colum one and compare the row 3 and 4 it should be equal
3. Take colum two and comapre the row 3 and 4 it should be equal
4. then check colum 4 and check row 3 and 4 greater value, if found the greater value check with the next row and print greater value of the same group.


The code i had tried for it is
#!/usr/bin/perl
#use strict;
use warnings;

open FILE,"out07.txt";

my @fields = split / /, <FILE>;
chomp @fields;
my @lines = split (/(\n)/, "@fields");
for (@lines)
{
    print @fields,"\n";
    
} 

In reply to Sorting using the highest last column criteria by deepakshyl

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.