Help for this page

Select Code to Download


  1. or download this
    # 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
    
  2. or download this
    perl -lpe 's/\#.*//; s/^\s+//; s/\s+$//; s/\s+/ /g; $_.="\t$." if $_' 
    +monster.pl |
      perl -lne '($c,$n)=split /\t/; push @{$h{$c}},$n;
    ...
                         join(",",@{$h{$_}}))
                 for (sort keys %h)
            } > line.histogram
    
  3. or download this
    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