perl:undefined subroutine :chmop called at line 1

z5253882 2016-10-24 11:25:56
错误提示:
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";
...全文
221 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
z5253882 2016-10-25
  • 打赏
  • 举报
回复
脑子进水了。。是chomp不是chmop

37,737

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • WuKongSecurity@BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧