in reply to Predeclaration
Perhaps what you are really asking is whether there is any advantage of initialising variables like this. As far as I know there is no substantive difference between the two of these:
However, you can gain some performance increase by pre-extending an array or a hash if you know what size it is likely to be:my @array; my @array = ();
my @array; $#array = 99; my %hash; keys %hash = 100;
--
John.
* Leaving arguments about bless() aside.
|
|---|