in reply to foreach - adding newlines?

Try chomp $event_line instead of plain chomp. The latter chomps $_.

I missed the bit where you said you'd tried this. Sorry about that.