#!/usr/bin/perl ########################################### # f -- Mike Schilli, 2002 # (m@perlmeister.com) ########################################### use warnings; use strict; use File::Basename; use Getopt::Std; use Pod::Usage; our $VERSION = "1.02"; our $CVSVERSION = '$Revision: 1.4 $'; getopts("hv", \my %opts); pod2usage(-verbose => 2) if $opts{h}; die "v$VERSION\n" if $opts{v}; pod2usage() if @ARGV != 1; printf "%3dC => %3dF\n", $ARGV[0], $ARGV[0]*9/5+32; printf "%3dF => %3dC\n", $ARGV[0], ($ARGV[0]-32)*5/9; __END__ =head1 NAME f - Convert temperatures between Celsius and Fahrenheit =head1 DOWNLOAD _SRC_HERE_ =head1 SYNOPSIS f [-hv] temperature temperature: Value to convert (either in F or C) Options: -h get help -v print program version =head1 OPTIONS =over 8 =item B<-h> Prints this manual page in text format. =item B<-h> Prints the script's current version number =back =head1 DESCRIPTION B takes a temperature value (either in Fahrenheit or Celsius) as a single argument and converts it to both Fahrenheit and Celsius. =head1 EXAMPLES $ f 100 100C => 212F 100F => 37C $ f 0 0C => 32F 0F => -17C =head1 LEGALESE Copyright 2002 by Mike Schilli, all rights reserved. This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHOR 2002, Mike Schilli