in reply to eval'ing coderef with ampersand

... and just as an addendum to jwkrahn's reply, prototyping is not used in and has no bearing on the behavior of any of the OPed statements.

Update: This may also throw some light on what is happening:

>perl -wMstrict -le "sub S { print 's' } print '[', eval \S, ']'; print $@; " s [] Undefined subroutine &main::SCALAR called at (eval 1) line 1.

Replies are listed 'Best First'.
Re^2: eval'ing coderef with ampersand
by hbm (Hermit) on Sep 07, 2010 at 13:24 UTC
    prototyping is not used in and has no bearing

    Agreed. My point was, prototyping is the only thing I can find regarding ampersands and subroutines.

    Thanks!