#!/usr/local/bin/perl -w use strict ; use Switch ; use constant PI => 3.141592653589793 ; use constant HALFPI => ( PI / 2.0 ) ; # half use constant TWOPI => ( 2.0 * PI ) ; # double print TWOPI."\n"; print HALFPI."\n"; # directory is '/home''''''''' my $long = 4.567 ; # radians my $convention = 'W' ; switch ( $convention ) { case ('E') { print "east longitude $long radians\n"; } case ('W') { $long = TWOPI-$long ; print "west longitude $long radians\n"; } else { print "error: $convention not valid\n"; } };