chtaylo2 has asked for the wisdom of the Perl Monks concerning the following question:
Something like this maybe?$data{$sub_alias}{$topic_sub}{$id}{ 'URL' } = 'my_url'; $data{$sub_alias}{$topic_sub}{$id}{ 'TITLE' } = 'mytitle'; $data{$sub_alias}{$topic_sub}{$id}{ 'CONTENTTYPE' } = 'my_type'; $data{$sub_alias}{$topic_sub}{$id}{ 'SUBCATEGORY' } = 'my_sub'; $data{$sub_alias}{$topic_sub}{$id}{ 'TOPIC_DESCRIPTION' } = 'my_desc'; $data{$sub_alias}{$topic_sub}{$id}{ 'RELATED_TOPICS' } = 'my topic';
Thank you!foreach $tmp_sa (@foo) { foreach $t (@bar)..... { foreach ( keys %{$data->{$tmp_sa}{$t}} ) { print "$data->{$tmp_sa}{$t}{$_}{'URL'}\n"; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl Hashes / Accessing data
by locked_user sundialsvc4 (Abbot) on Jul 30, 2010 at 00:06 UTC | |
by chtaylo2 (Initiate) on Jul 30, 2010 at 02:13 UTC | |
|
Re: Perl Hashes / Accessing data
by morgon (Priest) on Jul 29, 2010 at 23:02 UTC |