Blob


1 #!/usr/bin/perl
3 # Write a program that computes the circumference of a circle with a radius of
4 # 12.5. Circumference is 2π times the radius (approximately 2 times
5 # 3.141592654). The answer you get should be about 78.5.
7 use warnings;
8 use strict;
9 use utf8;
11 sub circum {
12 my $π = 3.141592654;
13 my ($radius) = @_;
14 return 2*$π*$radius;
15 }
17 print "circumference = " . circum(12.5) . "\n";