Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Sort log file alphabetically

by pc88mxer (Vicar)
on Jul 28, 2008 at 15:14 UTC ( #700566=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @list;
    while (<>) {
    ...
      }
      push(@list, \%hash);
    }
    
  2. or download this
    my %seen;
    for (@list) { for (keys %$_) { $seen{$_}++ } };
    delete $seen{first};
    delete $seen{date};
    my @allkeys = ('first', 'date', sort keys %seen);
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2020-08-14 21:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which rocket would you take to Mars?










    Results (76 votes). Check out past polls.

    Notices?