Here's one way:
my %router = ();
$router{"size"} = "big";
my $varname = "router";
eval <<EXEC or die $@;
print \$$varname\{'size'\} . "\n";
EXEC
Although you most certainly should be using a multi-dimensional datatype,
like a hash of refs to hashes.
Doug
On Mon, 26 Aug 2002, Angerstein wrote:
> Hello,
> can I / how can I use a variable as a hash name?
>
> $$myVar{key}?
>
> Thanxs!
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]