develooper Front page | perl.perl5.porters | Postings from April 2003

Re: slice autoextending ?

Thread Previous | Thread Next
From:
Enache Adrian
Date:
April 22, 2003 15:49
Subject:
Re: slice autoextending ?
Message ID:
20030422225021.GA1415@ratsnest.hole
On Tue, Apr 22, 2003 at 11:35:44PM +0100, Dave Mitchell wrote:
> bugid #1832 points out that there is an inconsistency between the docs and
> the behaviour of splice, in that the array isn't autoextended if
> the offset is off the end; eg
> 
>     perl -le 'splice(@x,10,1,'foo'); print 0+@x'
> 
> prints 1 rather than 10.
> 
> The bug dialogue contains proposals both for a doc patch or a code patch,
> but no concensus was reached (or even attempted, it would appear) as to
> which it should be.
> 
> I would vote for fixing the docs.

Wouldn't be that a rather useful feature ?

Regards
Adi

Thread Previous | Thread Next


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