in reply to Array inside hashes

Good morning! :-)

Here's a working script:

atl@companion:~/perl > cat aih.pl #!/usr/bin/perl -w %hash = (name => foo, list => [1, 2, 3]); foreach( keys %hash ){ print "key: $_, value: $hash{$_}\n"; } $ref = $hash{list}; @array = @$ref; foreach(@array){print "array: $_\n";} atl@companion:~/perl > aih.pl Unquoted string "foo" may clash with future reserved word at ./aih.pl +line 3. key: name, value: foo key: list, value: ARRAY(0x80cf9a4) array: 1 array: 2 array: 3 atl@companion:~/perl >
Since I didn't have my cup of tea yet (another sign of PM addiction: checking PM before making tea/coffee) I'll just let the code speak. ;-))

Ok, one comment. From the perlop manpage:

The => digraph is mostly just a synonym for the comma operator.
So your code means in essence
%hash = (name, foo, list, 1, 2, 4);
Have fun ...

Andreas