13

Gettin error in Perl hash

view full story
linux-howto

http://www.unix.com – Code: my %h = {}; $h{$ct} = {}; my $ct="a|b"; $h{$ct}->{'load'} = "load_check" if ($h{$ct} ); print "$h{$ct}->{'short'}\n";  #The value does not printed here however it should be print. my $ct="c|d"; $h{$ct}->{'unload'}  = "unload_check"  if ($h{$ct} ); foreach my $ct (keys %h) { print "$h{$ct}\n"; } Can anyone please help me to find the bug (HowTos)