[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl-AnyPerl] perl whine



I'd like to voice my frustration at the following perl behavior:

if you have a reference, say $ref->anon_array_ref->values,
and you dereference a value in an anon_array_ref, it gladly creates 
the anon_array_ref for you if it doesn't exist.

So say I have $ref->[
			anon1->[
				0,1,2
			       ],
			anon2->[0,1,2]
		    ]

and I say print ${$$ref[2]}[0];

Then it prints nothing, but suddenly $ref is now

		$ref-> [
			anon1->[0,1,2],
			anon2->[0,1,2],
			anon3->[]
		       ]

and if you have a conditional which checks for the existence $ref[2] 
being not true to stop a loop, suddenly you're toast.

Is this behavior helpful sometimes?

Sorry for the whine, but grrrrr!


Eric

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-anyperl-request@macperl.org