On 11/15/06, Ævar Arnfjörð Bjarmason <[EMAIL PROTECTED]> wrote:
On 11/15/06, Mark J. Reed <[EMAIL PROTECTED]> wrote:
> On 11/14/06, Vincent Foley <[EMAIL PROTECTED]> wrote:
> > I was toying around with Pugs and I tried the following Perl 5 list
> >
> >   my ($a, undef, $b) = 1..3;
> Huh.  I didn't think that worked in Perl 5, either.  What am I
> I distinctly recall having to do things like (my $a, undef, my $b) to
> avoid errors because you can't assign to undef.  Maybe I'm just
> hallucinating.

(my $x, undef, my $y) = 1 .. 3; parses to my ($x, undef, $y) = 1 .. 3
and always has as far as I know, so please share your hallucinogens
with the list:)

Sadly, the hallucinogens are essential, not external.  But I'm pretty
sure those are two different parse trees.

I misremembered the reason for the construct, though: assigning to
undef has always been ok (even in perl4 and probably earlier), but
declaring "my undef" wasn't, iirc.


Reply via email to