use strict; use warnings; my $originlog = shift; my $cbclog = shift; open my $ofh, '<', $originlog; open my $cfh, '<', $cbclog; while (1){ my $orig_line; do { $orig_line = <$ofh>; } while (!($orig_line =~ /\$\d+ \= (\d+)/)); $orig_line = $1; my $c_line; do { $c_line = <$cfh>; } while (!($c_line !~ /\$\d+ \= (\d+)/)); $c_line = $1; if ($c_line != $orig_line){ print "*"; print "$orig_line : $c_line\n"; exit 0; } print "$orig_line : $c_line\n"; }