June 2008
Beginner
352 pages
11h 16m
English
Invoke a subroutine from within any expression by using the subroutine name (with the ampersand):[‖]
&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 simply calling the subroutine.
[‖] 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!