#!/usr/bin/perl

$lastrow = -1;
$lastcol = -1;
$count= 0;
open thefile, "$ARGV[0].dpcm";
while (<thefile>) {
  next unless /^\("\|(\S+)"\s+(\d+)\s+(\d+)\s+R\d+\)/;
  if (($2 == $lastrow) && ($3 == $lastcol)) {
    $count++;
  } else {
    $lastrow = $2;
    $lastcol = $3;
    $count = 0;
  };
  print "$ARGV[0] cell $1 col${3}/sub${count}_B$2/AHHA\n";
}
