in reply to Re: Re: Working with references to scalars
in thread Working with references to scalars
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Working with references to scalars
by cees (Curate) on May 09, 2003 at 19:35 UTC |