It looks like your $sql_result is not defined and so $temp_hash becomes a scalar, which is not defined.
Certainly not. $temp_hash{undef} is entirely distinct from $temp_hash.
use strict; my %t; my $t; my $k; $t{$k}='toto'; $t='titi'; # print 'toto', not 'titi' print $t{$k}, "\n";
In reply to Re^2: Adding value to hash
by wazoox
in thread Adding value to hash
by danidin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |