Mercurial > hg > Members > anatofuz > nqp-cbc-tools
view logs2.pl @ 3:665fb2069aec
add logs2.pl
author | anatofuz |
---|---|
date | Sun, 04 Nov 2018 23:50:30 +0900 |
parents | |
children | eda9948f5e5a |
line wrap: on
line source
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"; }