I just need to search and replace '()' with '{}' and '=' with '=>'.
Instead of replacing
( ... )
with
{ ... }
replace it with
new_ordered_hash( ... )
and define new_ordered_hash as follows:
sub new_ordered_hash { my %ordered_hash; tie %ordered_hash, 'Tie::IxHash'; %ordered_hash = @_; return \%ordered_hash; }
Untested.
Don't forget to untie the lower level hashes when appropriate.
Note: This falls under "2) parsing the file yourself", from my previous post.
In reply to Re: Tie a hash of hashes?
by ikegami
in thread Tie a hash of hashes?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |