nefertiti has asked for the wisdom of the Perl Monks concerning the following question:
Column 0 and column 1 holds the computer location and name (respectively). They are unique only as a pair. Can any experts advice how I can get the top x matches for each category? In addition, I also need the error occurance count for each of the top x computer location/name. Thanks. Nefertitimy %error = ( 'disk' => 0, 'cpu' => 0, 'hdd' => 0, 'graphics' => 0, 'keyboard' => 0, '' => 0 #no error code ); for my $i (0 .. $#dataarray) { $error{$dataarray[$i][3]}++; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Complex sorting and counting question.
by Corion (Patriarch) on Sep 18, 2008 at 14:40 UTC | |
by nefertiti (Initiate) on Sep 19, 2008 at 02:19 UTC | |
by Corion (Patriarch) on Sep 19, 2008 at 06:34 UTC |