sub myprint($x,$y)
{
print "x is $x<br>";
print "y is $y<br>";
}
输出:
x is
y is
怎么回事?难道perl中就不能传递参数吗?
...全文
2103打赏收藏
怎么回事?难道perl中就不能传递参数吗?
perl中如何创建可以传递参数的函数 本人刚学perl,用perl编写函数传递参数,如下 $a=1; $b=2; &myprint($a,$b); sub myprint($x,$y) { print "x is $x"; print "y is $y"; } 输出: x is y is 怎么回事?难道perl中就不能传递参数吗?