#!perl -w
# NAME: hashtest.pl
# AIM: Test some HASH games
# 11/11/2008 - geoff mclane - http://geoffair.net/mperl
# ####################################################
use strict;
use warnings;
# are these equivalent?
my %hash1 = ( one => 'one', two => 'two' );
my %hash2 = ( 'one' => 'one', 'two' => 'two' );
show_hash ( \%hash1 );
show_hash ( \%hash2 );
# it seems they are ...
exit(0);

sub show_hash {
    my ($hr) = shift;
    foreach my $key (keys %{$hr}) {
        my $val = $$hr{$key};
        print "$key = $val\n";
    }
}

