sub gapify { my $str = shift; my $loc; while (@_) { $loc += shift; substr($str,$loc++,0)='-'; } $str }