Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: how to compare column 1 to column 2 and vice versa from multiple rows.

by ccn (Vicar)
on Oct 02, 2009 at 06:13 UTC ( [id://798789]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -lan
    # Usage: thisscript.pl genes.txt
    ...
    END {
        print for keys %uniq;
    }
    
  2. or download this
    Linux version:
    perl -lane '@u{@F}=() if $s{join "", sort @F}++ }{ print for keys %u' 
    +genes.txt
    
    Windows version:
    perl -lane "@u{@F}=() if $s{join '', sort @F}++ }{ print for keys %u" 
    +genes.txt
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://798789]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-03-28 08:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found