in reply to Re^2: Globals printing HASH
in thread Globals printing HASH
If you are going to use the variable as a reference to a hash then by all means initialise it that way, if you are going to store text there then initialise it as an empty string, if storing numbers then initialise it to zero. If not sure, then leave it undef.my $foo = {}; # $foo a reference to an empty anonymous hash my $foo = ""; # $foo contains an empty string my $foo; # $foo is undef
|
|---|