http://www.perlmonks.org?node_id=347345


in reply to Re: Re: Stumped when passing barewords
in thread Stumped when passing barewords

broquaint, thanks for the research. It seems you found the phenomenon causing the problem.

Fletch, I would expect for the bareword to stay the same, even in scalar context. If I change sub 1 to

sub sub1(*) { print "args(1): @_\n"; print scalar $_[0], "\n"; sub2(@_); }

the second value printed is Bareword and not 1.

So am I misunderstanding the spec here, or is it a bug?