develooper Front page | perl.perl5.porters | Postings from October 2005

Re: Sort / multicall patch: second draft

Thread Previous
Robin Houston
October 28, 2005 10:01
Re: Sort / multicall patch: second draft
Message ID:
On Wed, Oct 26, 2005 at 06:39:01PM +0100, Robin Houston wrote:
> [...] But this isn't ordinarily a problem: e.g.
>   $ ./perl -e '@a=(1..10); @b = (@a,(@a=())); print @b'
> doesn't cause this error.

Never mind! You *do* still get the same problem with:

   $ ./perl -e '@a=(1..10); my @b = (@a,(@a=()))'

The code I had before only "works" because the new scalar
that is allocated from the pool for the copy happens to
be the same as the old freed one that's being copied!

So this problem is not at all specific to sort(), though
it is certainly real.


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About