in reply to Parsing a Simple Log File

Ugly but quite short code:

while (<>) { next unless /CUSTOMER/; my $count = (<>, <>); # WTF s/^\s+//, s/\s+$// for $_, $count; print "$_ -> $count\n"; }