Is there any issues using that way if it works?
my $foo = {}; # $foo a reference to an empty anonymous hash
my $foo = ""; # $foo contains an empty string
my $foo; # $foo is undef
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. | [reply] [d/l] |
If you want $foo to hold an empty string rather than a reference to an anonymous hash, then no, no issue at all.
| [reply] [d/l] |