On Feb 10, 2006, at 3:51 PM, Jonathan Gorman wrote:

How do I loop through a reference to an array?

I have the following data structure:

 my %facets = (
   'audiences' => [('freshman', 'senior')],
   'subjects'  => [('music', 'history')],
   'tools'     => [('dictionaries', 'catalogs')]
 );

 foreach my $key (sort(keys(%facets))) { print $key, "\n" }

Quick short answer, @{$facets{$key}}..so


Thank you for the quick responses. Tastes great; less filling.

Now I'm going to make each value in the referenced array a reference to a hash; I'm going to make my data structure deeper. 'More later.

--
Eric Morgan

Reply via email to