sub filterLog() { s/ {2,}/ /g; s/^((?:\S+ ){3}).+?\[?I\]?:/$1/; s/ ?: / /g; s/ ACK (\w) / $1 ACK /; return if exists $opts{'day'} and not /^$opts{'day'}/o; return if exists $opts{'user'} and not /[\(\[]\s*(?:$opts{'user'})/o; if (exists $opts{'start-time'} || exists $opts{'stop-time'}) { if ($line =~ /((\d{2}):(\d{2}):(\d{2})\.(\d{3}))/o) { return if exists $opts{'start-time'} and $opts{'start-time'} lt $1; return if exists $opts{'stop-time'} and $opts{'stop-time'} gt $1; } } warn $line if $opts{'verbose'} > 3; return pack 'da*', ( $2*60 + $3 )*60 + "$4.$5" ), $_; }