Convert Decimal degrees into Degree Minute Second for PerlMonks stats page. Allows degrees to be entered as negative and does the Right Thing.
#!/usr/bin/perl use strict; while(<>) { my $n=''; chop; if($_<0) { $n='-'; $_=abs($_); } my $s=sprintf "%.0f", $_*3600%60; printf "$n%d:%02d:%02d\n", $_, $_*60%60, $s; }

Replies are listed 'Best First'.
Re: Decimal Degrees to DMS (UTM?)
by DamnDirtyApe (Curate) on Oct 17, 2001 at 09:42 UTC
    Is there a (module | snippet | someone's private stash) to convert DMS to UTM coordinates?