Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Sort log file alphabetically

by pc88mxer (Vicar)
on Jul 28, 2008 at 15:14 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://700566]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2024-04-18 07:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found