in reply to Re: Re: problem with hash keys
in thread problem with hash keys
(I've also taken the liberty of using lowercase variable names; you should probably use all-uppercase names only for special global variables).# ... push @grammar_keys, $1 unless exists $grammar{$1}; $grammar{$1} = $2; # ... print "$k\n" for my $k (@grammar_keys);
Or you can use a module like Tie::IxHash, which implements hashes with ordered keys just like you want.
|
|---|