- 论坛徽章:
- 0
|
Hi,
to FL.1:
This data structure called hash of hash, which means a normal hash contains
a reference to hash. For example:
- %hash = ( # normal hash
- 'file' => {'cnt'=> 99}, # ref. hash
- # more data ...
- );
- # call
- print $hash{file}{cnt};
- # or
- print $hash{file}->{cnt};
- # or
- use Data::Dumper;
- print Dumper(\%hash); # you will see a clear data strucure.
复制代码
to FL.2
use Data:Dumper;
print Dumper($hash);
This is a blind Dumper!!!
if so, %hash must be defined as reference to hash.
$hash = {file => {cnt=>999}};
# call
print $hash->{file}->{cnt};
to FL. 3
use Data:umper;
print Dumper(%hash);
Still better: print Dumper(\%hash);
--ulmer |
|