标题:undefined subroutine :chmop called at <STDIN> line 1
只看楼主
lyl930130
Rank: 3Rank: 3
等 级:论坛游侠
帖 子:323
专家分:111
注 册:2013-5-13
结帖率:91.43%
 问题点数:0 回复次数:1 
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";
搜索更多相关主题的帖子: undefined called 
2016-10-24 10:51
lyl930130
Rank: 3Rank: 3
等 级:论坛游侠
帖 子:323
专家分:111
注 册:2013-5-13
得分:0 
脑子进水了。。是chomp不是chmop
2016-10-25 16:47



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-470185-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017330 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved