in reply to Super Duper Inefficient
Why not split @DATAinto lots of $hostid. Try:next if ($hostid ne $SERVER{$server});
Then instead of running through @DATA for each $hostid you can just run through @{$new_data{$hostid}} once you have determined $hostidmy %new_data = (); foreach ( @DATA ) { my ($hostid, $rest) = split /\t/, $_, 2; push @{$new_data{$hostid}}, "$hostid\t$rest"; }
--tidiness is the memory loss of environmental mnemonics
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Super Duper Inefficient
by Anonymous Monk on Jun 20, 2003 at 13:35 UTC |