Black-REN

好记性,不如烂笔头! Record your work !

arguments for subroutine in Perl

Perl automatically stores the paremeter list in the special array variable named @_ for the duration of the subroutine. The subroutines can get the number of arguments and the value of those arguments. $_[0], $_[1] ...., they are different from $_     (almost used in foreach circulation), the former one is array and the last one is scalar.


my $arguments; #private variables

阅读更多
文章标签: perl
个人分类: Perl
上一篇scalar and list context in Perl
下一篇strict pragma in Perl
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭