rads2degs.pl to HTML.

index -|- end

Generated: Sun Aug 21 11:11:24 2011 from rads2degs.pl 2010/08/17 543.

#!/usr/bin/perl -w
# NAME: rads2degs.pl
# AIM: Given input of RADIANS, output DEGREES
use strict;
use warnings;
use Math::Trig;
# $rad = deg2rad(120);
my ($rads);
if (@ARGV) {
    $rads = shift @ARGV;
    if ($rads =~ /^(\d|-|\+|\.)+$/) {
        print "Converting [$rads] radians = ".rad2deg($rads)." degrees\n";
    } else {
        print "Converting [$rads]? = ".rad2deg($rads)." degrees, but appears not a radian value!\n";
    }
} else {
    print "Enter the radians to convert to degrees...\n";
}
# eof - rads2degs.pl

index -|- top

checked by tidy  Valid HTML 4.01 Transitional