#!/usr/bin/perl use strict; use warnings; use Parse::Syslog; my ($parser, $sl); while (<>){ $parser = Parse::Syslog->new($_); while($sl = $parser->next) { print "here\n"; print qq[ program $sl->{program} with pid $sl->{pid} on host $sl->{host} said $sl->{text} at $sl->{timestamp} ]; } }