in reply to Out of memory!!??
If you have some very long lines, that prevents them from being all stored in the hash.
This is not your main problem, but might be a precaution anyway.
As a side not, the if (exists ... code is superfluous, you can just as well increment $CALHASH{$layer}{'freq'} if the entry exists or not.
|
|---|