On Tue, 2004-06-29 at 12:19, Daniel Falkenberg wrote:
> Hello All,
>
> I currently have a hash of a hash...
>
> > %HoH = (
> > Key1 => {
> > Apple => "Green",
> > Banna => "Yellow",
> > },
> > Key2 => {
> > Carrot => "Orange",
> > Tomoatoe => "Red",
> > },
> > );
>
>
> How can I assign Key2 to a variable?
I think you mean the value of Key2 to a variable right ?
If you want a hash variable use
%hash = %{$HoH{Key2}}
Of course this way the hash is *copied* into %hash and now changing
%hash does not affect the %HoH data
Bye
Ram
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>