#2
lyl9301302016-10-25 16:47
|
undefined subroutine &main :: chmop called at ./a.pl line 9 , <STDIN> line 1.
代码如下:
程序代码:
#!/usr/bin/perl
$a = 3.141592654*2*12.5 ;
$pi = 3.141592654;
print "$a\n\n";
print "input the radius of a circle : ";
#$radius = 3;
$radius = <STDIN>;
chmop ( $radius );
#chmop ( $radius = <STDIN> ) ;
$circ = 2 * $pi * $radius ;
print "the circumference of the circle of raidus $radius is $circ\n";
$a = 3.141592654*2*12.5 ;
$pi = 3.141592654;
print "$a\n\n";
print "input the radius of a circle : ";
#$radius = 3;
$radius = <STDIN>;
chmop ( $radius );
#chmop ( $radius = <STDIN> ) ;
$circ = 2 * $pi * $radius ;
print "the circumference of the circle of raidus $radius is $circ\n";