On Thu, 21 Nov 2002 07:42:55 -0500, [EMAIL PROTECTED] (Wiggins D'Anconia) wrote:
> > >chris wrote: >> How do I do the following without getting the message >> Can't use string as hash ref while strict refs in use >> >> use warnings; >> #use strict; >> my($a, @b, $c); >> $a = '20020603'; >> $b[1] = 'name1'; >> $b[2] = 'name2'; >> $b[3] = 'name3'; >> my %h; >> $h{$a} = $a; > >$h{$a} = {}; > >Or leave this line out all together. > >> $h{$a}->{$b[1]}= 1; >> $h{$a}->{$b[2]}= 2; >> $h{$a}->{$b[3]}= 3; >> print $h{$a}->{$b[1]} . "\n"; >> print $h{$a}->{$b[2]} . "\n"; >> print $h{$a}->{$b[3]} . "\n"; >> > >http://danconia.org So simple. Thank you for your help. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]