in reply to Calling a hash through an array value

Bad c! No cookie! We do not use symbolic references.

Instead, make a hash of hashes (or HoH). So, do something like:

my %asn; for my $i (@asnValues) { my @asnParams = split / /, $i; my $keyName = $asnParams[0]; $asn{$keyName}{risk} = $queueNsp[2]; }
Treat it as you would a 2-D array in C or BASIC or JAVA or any other language. The only difference is that you don't have to pre-declare it. Perl does that for you on the fly. (If you don't need or want to know how, then just assume it will work and go about your business.)

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Replies are listed 'Best First'.
Re: Re: Calling a hash through an array value
by FamousLongAgo (Friar) on Jan 08, 2003 at 22:25 UTC
    Well, of course we can use symbolic references - when it's the right thing to do.

    But here it's not.

    Here is a detailed explanation (Dominus article) for why dragonchild bit your head off.