Tie::IxHash doesn't even work in that situation. The problem is that when you use a hash reference altogether -- that is,
$hash{x} = { ... } -- you are creating a hash reference in Perl, and that is not "caught" by Tie::IxHash. You
can't achieve the desired goal the way
File is set up. You'll
need to change it, no matter what you do.