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";
ThanksIn reply to very 1st question for my baby-walk coding by isisgu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |