#Tie::IxHash
#ordered associative arrays for Perl
#to display same order in the hash
use Tie::IxHash;
tie (%hash, Tie::IxHash);
$hash{'one'} = "un";
$hash{'two'} = "deux";
$hash{'three'} = "trois";
while (($k, $v) = each %hash) {
print "$k\t$v\n";
}
No comments:
Post a Comment