#!/usr/local/bin/perl # # holecoord.perl : make drill coordinates from drill report # require "getopts.pl"; $opt_n="[0-9]+"; &Getopts('n:h'); if($opt_h){ print <){ if(/^THRUHOLES/){ last; } } while(<>){ if(/^\s*([0-9.-]+)\s+($opt_n)\s+([0-9.-]+)\s+([0-9.-]+)/){ $x=int($3*25.4+0.5); $y=int($4*25.4+0.5); print "$x,$y\n"; } }