
SQA777
New User
Jul 29, 2011, 9:04 PM
Post #1 of 2
(535 views)
|
|
Printing an anonymous array of a hash
|
Can't Post
|
|
I created an anonymous array. Each element is a hash.
my $ref = [ {'name' => "John", 'company' => "Ford", 'project' => "Taurus" }, {'name' => "Doe", 'company' => "Ford", 'project' => "Fiesta" } ]; I want to print the whole anonymous list. I don't want to print each element of the array with a foreach command.
print "$ref \n"; print @{$ref}; ...do not work. How do I print out the whole array of hash elements?
|