Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: speed up one-line "sort|uniq -c" perl code

by tachyon (Chancellor)
on Apr 10, 2003 at 01:44 UTC ( [id://249514]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    my %h;
    ...
    }
    close F;
    print "$h{$_}\t$_\n" for keys %h;
    
  2. or download this
    #!/usr/bin/perl
    {
    ...
    my %h;
    $h{$_}++ for @ips;
    print "$h{$_}\t$_\n" for keys %h;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2024-06-20 04:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.