in reply to Undefined Hash Values and Ternary Operators

I have never come across any random shifting in a hash like you state. If the keys value is undef, then it is undef. I have never seen Perl decide to suddenly change the values of keys.
$a = undef; %H = ( 'x' => 'y', 'y' => $a, 'z' => 'a' ); for (1..10000) { print "FOO\n" if $H{x} ne 'y'; }

Nothing prints. The ternary operator work how you are using it. You are likely getting a warning because you are calling warn(), with no conditional:

warn "foo" unless defined($a);

Is how you want to use that.

Cheers,
KM