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

Re: Act 2: Storing &PL_sv_undef as an array value

Thread Previous
From:
Marcus Holland-Moritz
Date:
July 29, 2003 14:05
Subject:
Re: Act 2: Storing &PL_sv_undef as an array value
Message ID:
002301c35615$14ba6e10$0c2f1fac@R2D2
> I just realized that AVs suffer from nearly the same
> C<&PL_sv_undef> problem as HVs did.

...and here's another related problem with Storable:

mhx@r2d2 ~ $ cat test.pl 
use Storable qw(freeze thaw);
$a = [];           # new array
$#$a = 2;          # extend it
$a->[1] = undef;   # and initialize it
for $x ( $a, thaw(freeze($a)) ) {
  print "@{[map{~~exists $x->[$_]} 0..$#$x]}\n"
}

mhx@r2d2 ~ $ maintperl test.pl 
0 1 0
1 1 1


-- Marcus


Thread Previous


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