#!/usr/bin/perl -w
use strict;

foreach my $fn(<stacked*>)
{
  open IN,"<old/$fn";
  open OUT,">$fn";
  while(<IN>)
  {
    s/^([A-Z]+\w*)(:\s*)([A-Z]+\w*)(\s*)$/$1.cell$2$3.cell$4/;
    s/^([A-Z]+\w*)(:\s*)(DESC|LEVEL)(.*)$/$1.cell$2$3$4/;
    s/([A-Z]+\w*)(\s*)(\\)/$1.cell$2$3/;

    print OUT $_;
  }
  close IN;
  close OUT;

}
