All pastes #811106 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-12-10 16:42 UTC
rendered paste body
#!/usr/bin/perl

print "What is the radius of your circle?\n";
$wtf = 2*3.141592654;
chomp($radius = <STDIN>);
if ($radius !~ /^-?\d+\.?\d*$/) {
	print "Your radius is not a valid integer!\n";
} elsif ($radius < 0) {
	print "The circumference of your circle is 0!\n";
} else {
	print "The circumference of your circle is " . $radius*$wtf . "!\n";
}