Hi ,
# The $x is a hashreference and here :
my $ones = {};
$ones{a}={b=>1};
print "[$ones{a}]\n";
print "[$ones->{a}]\n";
print "[$ones{a}->{b}]\n";
print "[$ones{a}{b}]\n";
__END__
[HASH(0xe01d8)]
[]
[1]
[1]
$x->{a} is not the same as $x{a}
( $x->{a} will be a lookup of the key of a hashrefernce (the declaration in the above my $ones = {} kind of decalaration available ),
$x{a} will be a lookup of the key of %x)
$x{a}->{$b} is the same as $x{a}{$b}
Please read the
perldoc perldsc for all kinds of data structure decalaration definition and access