#!/usr/bin/perl -anl use POSIX "fmod"; $, = "\t"; /^segment/ and print "> -Z$F[3]" or print fmod( fmod( $F[1] + 180, 360 ) - 360, 360) + 180, $F[0];