On Wed, Nov 15, 2006 at 05:41:24PM +0000, Ævar Arnfjörð Bjarmason 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 
> >assignment
> >>
> >>   my ($a, undef, $b) = 1..3;
> >
> >Huh.  I didn't think that worked in Perl 5, either.  What am I 
> >misremembering?
> >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:)

I thought that allowing undef in my ($a, undef, $b) came in around 5.004ish,
but I can't find it in perldelta, and I don't have a version compiled to
test with (or any quick way to compile them, given that pretty much only
AIX is so stable that early perls compile unmodified. Probably someone will
tell me that VMS is also good enough, for 5.002 or later)

Nicholas Clark

Reply via email to