#!/usr/local/bin/perl # Copied from http://www.perforce.com/perforce/technotes/note031.html # $Id: //info.ravenbrook.com/project/mps/tool/rcs-import/terminal-ats.pl#1 $ while(<>) { if(/\@db.desc\@/) { $total=0; do { $count = $_; $count =~ s/[^@]//g; $total += length($count); print; $_=<>; } while( ! /\@put\@/ ); if($total%2) { print "@\n"; } } print; }