Tried to store a hash reference in a Storable file and it worked fine. However I also had a requirement to keep the keys in a sorted order - so I used the following
tie %$hashref, 'Tie::IxHash';
store $hashref, $filename;
But this doesn't work - the file gets created but its only 50 bytes in size and when I use retrieve(), I get an empty hash.
I tried using Tie::IxHash::Easy (because my hash is a hash of hashes) but to no avail. Any help?
You need to tie the hashref before you populate it
returns