in reply to Re: How could I make this code more optimized
in thread How could I make this code more optimized
Why on Earth are you testing $ref->{date} eq $Date inside of the inner foreach loop? If they're not equal, skip the inner foreach loop altogether!
Admittedly, this was probably more important back when you were using a regex match instead of eq. But it could still make a big difference...
Update: And while I'm at it, these lines:
Can be replaced with this:foreach $key (keys %hash) { $ref = $hash{$key};
foreach $ref (values %hash) {
buckaduck
|
|---|