- 论坛徽章:
- 0
|
Hi,
they are different data structures, see more
>perldoc perlref
>perldoc perlreftut
>perldoc perldsc
>perldoc perllol
原帖由 mingjwan 于 2007-8-17 17:44 发表 ![]()
定义了一个数组引用.
my $a=[1,2,3];
this is defined a reference to array.
see data structure as following:
> perl -MData::Dumper -e '$a=[1,2,3]; print Dumper $a'
$a{"wanjm"}=['a','b','c'];
This is defined a hash that key "warjm" points its value which is a reference to array.
see data structure:
>perl -MData::Dumper -e "$a{'wanjm'}=['a','b','c'];print Dumper \%a;"
--ulmer |
|