Learning Perl: 4.2. Invoking a Subroutine
来源:互联网 发布:常州软件培训机构 编辑:程序博客网 时间:2024/06/08 06:16
4.2. Invoking a Subroutine
Invoke a subroutine from within any expression by using the subroutine name (with the ampersand):[§]
[§] And frequently a pair of parentheses, even if empty. As written, the subroutine inherits the caller's @_ value, which we'll be discussing shortly. So don't stop reading here, or you'll be writing code with unintended effects.
&marine; # says Hello, sailor number 1! &marine; # says Hello, sailor number 2! &marine; # says Hello, sailor number 3! &marine; # says Hello, sailor number 4!
Most often, we refer to the invocation as calling the subroutine.
- Learning Perl: 4.2. Invoking a Subroutine
- Learning Perl: 4.1. Defining a Subroutine
- Perl Learning 3 Subroutine
- Subroutine in Perl
- arguments for subroutine in Perl
- perl:在Subroutine中使用全局变量
- 执行perl时出现Undefined subroutine
- Learning Perl: 5.7. Opening a Filehandle
- Perl Learning: 5.10. Reopening a Standard Filehandle
- Learning Perl: 6.1. What Is a Hash?
- Learning Perl: 8.9. A Pattern Test Program
- Learning Perl: 1.4. How Do I Make a Perl Program?
- Learning Perl: 1.5. A Whirlwind Tour of Perl
- Learning Perl
- Learning Perl
- Learning Perl
- Learning Perl:
- Learning Perl
- Learning Perl: 3.8. in List Context
- 个人总结这个东西,还是要写的
- 求一个数组中第二大数...
- Learning Perl: 4.1. Defining a Subroutine
- 如何顺利实现LINUX系统开机自动启动指定的脚本程序
- Learning Perl: 4.2. Invoking a Subroutine
- OpenCore之文件解析
- 控制网页不打印和分页
- 分解字符串 插入表中 如 1,2,3 相当于 C#中的 Split 方法
- Learning Perl: 4.3. Return Values
- Learning Perl: 4.4. Arguments
- Web.Config文件详解
- 网站分析的数据指标
- Learning Perl: 4.5. Private Variables in Subroutines