On Jan 15, 10:57 am, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: > [EMAIL PROTECTED] wrote: > > How do I change the value stored to a hash reference? > > C:\home>type test.pl > my %hash = ( > key => { > refkey => 'oldvalue', > }, > ); > print "$hash{key}->{refkey}\n"; > $hash{key}->{refkey} = 'newvalue'; > print "$hash{key}->{refkey}\n"; > > C:\home>test.pl > oldvalue > newvalue > > C:\home> > > -- > Gunnar Hjalmarsson > Email:http://www.gunnar.cc/cgi-bin/contact.pl
I know how to change the value stored in hash, that isn't the problem. Here's a short example of the problem which fails... use strict; my %hash; $hash{ 'key' } = 1; $hash{ key }{ 'hoh' } = 'test'; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/