[OT] Refs don't work, like I want

2002-05-17 Thread Viljo Marrandi
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, };

Re: [OT] Refs don't work, like I want

2002-05-17 Thread F . Xavier Noria
On Fri, 17 May 2002 17:10:53 +0300 (EEST) Viljo Marrandi [EMAIL PROTECTED] wrote: : $vars-{'key2'} = value of second key; The hash $vars points to has a key named key2. : $vars = { : xxx = AAA, : yyy = BBB, : zzz = CCC, : }; Now you change the reference stored in $var. It points

Re: [OT] Refs don't work, like I want

2002-05-17 Thread Stas Bekman
Viljo Marrandi wrote: 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. Please do NOT do that in the future. This is the *modperl* list. There are hundreds of perl lists which will gladly help you out.

Re: [OT] Refs don't work, like I want

2002-05-17 Thread Stas Bekman
Stas Bekman wrote: I know I don't sound nice, but we try hard to keep a low Sound to Noise Ratio here. of course I meant a *high* Sound to Noise Ratio. the heat and humidity shows :) p.s. sorry for adding to the noise. back to work on adding more sound.

Re: [OT] Refs don't work, like I want

2002-05-17 Thread Jon Robison
In support of F. Xavier Noria, and in simpler terms - your $vars = { . } overwrote your previous assignment of $vars-{'key2'}. Perhaps you could have done: my $var = {}; $var-{'key2'} = some value; my @args = qw/ XXX YYY ZZZ /; my @vals = qw/ AAA BBB CCC /; my $i; for ($i =0; $i

Re: [OT] Refs don't work, like I want

2002-05-17 Thread Per Einar Ellefsen
At 16:10 17.05.2002, Viljo Marrandi wrote: 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 = {