in reply to Re: subroutine ref while "strict refs"
in thread subroutine ref while "strict refs"

\&$_ is except from strict refs

Very good point, although I think (?) that's just a specific case of the more general exemption my $x = "foo"; my $y = \&$x; &$y; or my $y = \&{"foo"}; &$y;

Replies are listed 'Best First'.
Re^3: subroutine ref while "strict refs"
by ikegami (Patriarch) on Jul 28, 2014 at 21:17 UTC

    I didn't mean to be exclusionary. \&{EXPR} as a whole is exempt, including the \&$NAME shorthand. CONST->() is also exempt.

    For example, (\&$name)->() is the same as $name->(), but it bypasses the symbolic reference check requested by using strict.