in reply to Parsing Logs

Tip #3 from the Basic debugging checklist: use print inside your nested foreach loops to inspect variable values:

print "id = >>>$id<<<\n"; print "line = >>>$line<<<\n";