in reply to dereference an array

You have a hash of references to arrays keyed by category.
Each array is a list of records.
Each record is a reference to an array with three elements (web address, site name and site desc).

foreach my $category (sort keys %sortmenu) { foreach my $record (@{ $sortmenu{$category} }) { print "web address: $record->[0]\n"; print "site name: $record->[1]\n"; print "site desc: $record->[2]\n"; print "\n"; } }

Data::Dumper may aid you in visualizing your data structure.

use Data::Dumper; print(Dumper(\%sortmenu));

Replies are listed 'Best First'.
Re^2: dereference an array
by Anonymous Monk on Oct 22, 2007 at 14:45 UTC
    That's a very nice explanation, thanks very much for your time - this is nearly on the verge of blowing a cerebral gasket!! :)