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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Scalar context changes bareword value?
by Fletch (Bishop) on Apr 22, 2004 at 13:30 UTC | |
by crenz (Priest) on Apr 22, 2004 at 13:35 UTC | |
by Fletch (Bishop) on Apr 22, 2004 at 13:45 UTC |