June 2002
Beginner
759 pages
80h 42m
English
The ampersand (&) is the identifier used to call
subroutines. Most of the time, however, subroutines can be used in
an expression just like built-in functions. To call subroutines
directly:
name(args); # & is optional with parenthesesnameargs; # Parens optional if predeclared/imported &name;# Passes current @_ to subroutine
To call subroutines indirectly (by name or by reference):
&$subref(args); # & is not optional on indirect call
&$subref; # Passes current @_ to subroutine