undefined subroutine :chmop called at <STDIN> line 1
错误提示: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";