Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to determine which is the better method of declaring variables, which method is more expensive (CPU, Memory, etc).
my ($var1,$var2); $var1 = subroutine0_with_return_value(); $var2 = subroutine1_with_return_value();
...or...
Does declaring the variable before assigning it cost more (CPU) than declaring and assigning at the same time?my $var1 = subroutine0_with_return_value(); my $var2 = subroutine1_with_return_value();
|
|---|