Timm Murray writes:
> I've always thought of Perl5 having two basic types: Scalar and List, with
> Hash and Array being subtypes of List. The reason is that arrays and hashes
> can be easily converted into each other, because of Perl5's list-flatening
> nature:
>
> @array = %hash;
> %hash = @array;
I wouldn't say that:
my $array = [1, 2, 3, 4];
print $array->{1}; # error!
Perl doesn't automatically convert between them; however, you're allowed
to assign them to each other. That is, a hash isn't a list, but in list
context, it turns into one.
Luke