The environment here is to complex and relies on
proprietary vendor tools which I can't send, so here's
a chunk.  I'm trying to figure out if the second
foreach is really required in the code below -
preferably there is a way to do this with a single
foreach statement?

my %tplCfg = (
    "category1" =>
    {
        "cat1type1" =>
        [
            {
                dir =>  "cat1type1dir1",
                tpl =>  "cat1type1tpl1",
                ext =>  "cat1type1ext1",
                rgx =>  "cat1type1rgx1",
            },
        ],
        "cat1type2" =>
        [
            {
                dir =>  "cat1type2dir1",
                tpl =>  "cat1type2tpl1",
                ext =>  "cat1type2ext1",
                rgx =>  "cat1type2rgx1",
            },
        ],
    },
    "category2" =>
    {
        "cat2type1" =>
        [
            {
                dir =>  "cat2type1dir1",
                tpl =>  "cat2type1tpl1",
                ext =>  "cat2type1ext1",
                rgx =>  "cat2type1rgx1",
            },
            {
                dir =>  "cat2type1dir2",
                tpl =>  "cat2type1tpl2",
                ext =>  "cat2type1ext2",
                rgx =>  "cat2type1rgx2",
            },


        ],
    }
);

$cfgs = $tplCfg{'category2'}{'cat2type1'};

foreach my $item ( @$cfgs )
{
    foreach my $inner ( $item )
    {
        print "$inner->{'dir'} : $inner->{'tpl'} :
$inner->{'ext'} : $inner->{'rgx'}\n";
    }
}


__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to