Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^4: Rosetta Code: Long List is Long -- dualvar

by eyepopslikeamosquito (Archbishop)
on Dec 04, 2022 at 06:35 UTC ( [id://11148545]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -lae "$r{$F[0]}+=$F[1]}{print qq($_\t$r{$_})for sort{$r{$b}<=>$r{
    +$a}||$a cmp $b}keys %r" big1.txt big2.txt big3.txt >oneliner.tmp
    
  2. or download this
    sort{$r{$b}<=>$r{$a}||$a cmp $b}keys %r
    
  3. or download this
    sort{$r{$b}<=>$r{$a}}sort{$a cmp $b}keys %r
    
  4. or download this
    perl -MO=Terse -e "sort{$r{$b}<=>$r{$a}||$a cmp $b}keys %r"
    LISTOP (0x299c080) leave [1] 
    ...
            UNOP (0x2882f08) keys [11] 
                UNOP (0x2882f40) rv2hv [10] 
                    PADOP (0x2882f78) gv  GV (0x2654ae0) *r
    
  5. or download this
    perl -MO=Terse -e "sort{$r{$b}<=>$r{$a}}sort{$a cmp $b}keys %r"
    LISTOP (0x2940c18) leave [1] 
    ...
                UNOP (0x2940ad0) keys [11] 
                    UNOP (0x2940b08) rv2hv [10] 
                        PADOP (0x2940b40) gv  GV (0x26344d8) *r
    
  6. or download this
    perl -MO=Terse -e "sort{$r{$b}<=>$r{$a}}sort keys %r"
    LISTOP (0x29e2518) leave [1]
    ...
                UNOP (0x29e26d0) keys [8]
                    UNOP (0x29e2708) rv2hv [7]
                        PADOP (0x29e2740) gv  GV (0xec4098) *r
    
  7. or download this
    sort{$r{$b}<=>$r{$a}}sort{$a cmp $b}keys %r
    
  8. or download this
    sort{$r{$b}<=>$r{$a}}sort keys %r
    
  9. or download this
    use sort 'stable';
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (1)
As of 2024-04-24 14:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found