http://www.perlmonks.org?node_id=585149


in reply to Re^4: trouble parsing log file...
in thread trouble parsing log file...

The while (<DATA>){ line needs to read
while (<LOG>){

<DATA> file handle is a "special" one that points to the bit in your script following the __DATA__ marker. This is useful to demonstrate the data associated with code in a forum like this.

As suggested by others, it is good practice to close your file handle once you are finished with it.

close LOG;