According to perldoc perlsub, the & is optional as are the parentheses if the subroutine has been predeclared. The & is not optional when just naming the subroutine. Nor is it optional when you do an indrect subroutine call with a subroutine name or reference using the &$subref() or &{$subref}() constructions, although the $subref->() notatation solves that problem.
In reply to Re: Re: Re: Working with references to scalars
by mvaline
in thread Working with references to scalars
by cees
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |