in reply to Variable declaration optimization?
Before we tell you which one is a few nano-seconds faster, you have to tell us what you're going to do with the time you save.
There's also initializing them with a list ... generally better with constants.
my ( $var1, $var2 ) = ( $FIRST_INDEX, $SECONDS_IN_A_YEAR );
As Occam said: Entia non sunt multiplicanda praeter necessitatem.
|
|---|