# print line numbers and code for blocks of "$x.=blah":
perl -ne 'if(/^\s*(\$\w+)\s*\.=/){
if($1 ne $prv) {print "\n"; $prv=$1}
printf "%5d: %s",$.,$_;}' monter.pl > bad_blocks.list
####
perl -lpe 's/\#.*//; s/^\s+//; s/\s+$//; s/\s+/ /g; $_.="\t$." if $_' monster.pl |
perl -lne '($c,$n)=split /\t/; push @{$h{$c}},$n;
END { print join("\t",$_,
scalar @{$h{$c}},
join(",",@{$h{$_}}))
for (sort keys %h)
} > line.histogram
####
perl -lpe '($c,$lines)=split /\t/;
if($lc and $c){ $d=$c^$lc; $sc=$d=~y/\x0/#/;}
$lc=$c; s/^/$sc\t/' line.histgram > line.similarity