Geoffrey Young wrote:
>>- while (my($key, $file) = each %Apache2::Reload::INCS) {
>>+ foreach my $key (sort { $a cmp $b } keys %Apache2::Reload::INCS) {
>>+ my $file = $Apache2::Reload::INCS{$key};
>
> I hate each.each is perfect when iterating over a large hash and not caring about ordering. Doesn't need to build a large array to hold _all_ the keys, so it's a major speed improvement. I am not sure what is gained here by sorting ? -------------------------------------------------------------------------------- Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5 http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
signature.asc
Description: OpenPGP digital signature
