in reply to making arrays that act like hashes at runtime
which maps the key "z" onto the first unused index in the pseudo-hash array. After that, you can access the new entry directly, to assign it a value:$pseudo_hash->[0]->{"z"} = @{$pseudo_hash};
</quote> ---- </quote>$pseudo_hash->{"z"} = "value z";
my $a = [ {first=>1, second=>2}, "hello", "there" ]; print "$a->{first}\t$a->{second}\n"; $a->[0]->{'third'} = @{$a}; $a->{'third'} = "foo"; print "$a->{first}\t$a->{second}\t$a->{third}\n";
|
|---|