isisgu has asked for the wisdom of the Perl Monks concerning the following question:
I am learning the perl. During my very baby-walk coding, I kept getting this error:
BEGIN not safe after errors--compilation aborted at /System/Library/Perl/5.12/Carp/Heavy.pm line 4. Compilation failed in require at /Users/apple/Library/Application Support/TextMate/Managed/Bundles/Perl.tmbundle/Support/exception_handler.pm line 30.
My actual codes:
#!/usr/bin/perl
use strict;
use warnings;
my $pi = 3.141592654;
print "what is the radius?\n";
my ($radius)= ;
$radius = <STDIN>;
chomp $radius;
my ($circ) = 2* $pi * $radius;
print "the circumference of a circle of $radius is $circ.\n";
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: very 1st question for my baby-walk coding
by LanX (Saint) on Apr 03, 2014 at 00:44 UTC | |
|
Re: very 1st question for my baby-walk coding
by AnomalousMonk (Archbishop) on Apr 03, 2014 at 01:49 UTC | |
|
Re: very 1st question for my baby-walk coding (textmate)
by Anonymous Monk on Apr 03, 2014 at 00:38 UTC | |
|
Re: very 1st question for my baby-walk coding
by Discipulus (Canon) on Apr 03, 2014 at 06:59 UTC |