in reply to Re^2: eval'ing coderef with ampersand
in thread eval'ing coderef with ampersand
perlop says "Unary '\' creates a reference to whatever follows it." and refers you to perlref.
perlref shows special that \&handler is the means of getting a reference to a function.
\handler and \handler() are clearly not special cases, so the \ applies to the value returned by the expressions that follows. They could be written \( handler ) and \( handler() ).
The behaviour of \&handler() is not documented, but there's only one parsing that wouldn't result in an error: \( &handler() ).
|
|---|