develooper Front page | perl.perl5.porters | Postings from August 1999

Re: The extent of double-quotish interpolation

From:
Ilya Zakharevich
Date:
August 27, 1999 22:26
Subject:
Re: The extent of double-quotish interpolation
Message ID:
199908280526.BAA20712@monk.mps.ohio-state.edu
[A complimentary Cc of this posting was sent to Rick Delaney 
<rick.delaney@home.com>],
who wrote in article <37C7657C.31EBBD3@home.com>:
> >     As a special rule, if a list slice would produce a list
> >     consisting entirely of undefined values, the null list is
> >     produced instead. This makes it easy to write loops that
> >     terminate when a null list is returned:
> > 
> >         while ( ($home, $user) = (getpwent)[7,0]) {
> >             printf "%-8s %s\n", $user, $home;
> >         }
> 
> I see this addition is still in there (you first showed it to me when I
> sent a bug report about this).  Do we really want to set this behaviour
> in stone so it can never be changed?

If I remember the discussion on p5p correctly, this feature was added
per Tim's request.  Later Tim agreed that this was not used as he
wanted, and there was a better alternative to this ugly hack.

I Cc to p5p to clarify things.

Ilya



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About