Hello,

Sorry about non mod_perl question, but as I'm subscribed to this list and
I know I can get help from here, I ask my question here.

Can anyone tell me, what's wrong with this piece of code:

$vars->{'key2'} = "value of second key";
$vars = {
    xxx => "AAA",
    yyy => "BBB",
    zzz => "CCC",
};
$vars->{'key1'} = "value of first key";

foreach $a ( keys %{$vars} ) {
   print "$a = $vars->{$a}\n";
}


Problem is, that value of key2 is lost after I set values to xxx, yyy and
zzz, but key1 is ok. I searched through perlref, perldsc manpages, but
didn't find anything similar (maybe that's the problem?).

Any help is welcome.

Rgds,
Viljo

Reply via email to