Help for this page

Select Code to Download


  1. or download this
    my @data = (
                 [1,"info"],   
    ...
                 [4,"info"],   
                 [4,"info"],   
                );
    
  2. or download this
    my %freq = ();
    foreach my $datum (@data) {
        $freq{ sprintf("%d    %s", @$datum) }++;
    }
    
  3. or download this
    {
        local $,=$/;
        print sort { $freq{$b} <=> $freq{$a} } keys %freq;
    }