At the introductory level it seems like I have often seen code like this:

use strict;

my $var = 1;

And as I review other peoples' scripts I have often encountered code like
this:

use strict;

my ( $this, $that, $the_other );

Which I interpreted as a mechanism to declare a number of scalar variables
with a minimum of typing.  But lately I've been seeing this syntax and I was
wondering if it was fundamentally different (and somehow more desirable):

use strict;

my ( $var ) = 1;

As if $var is being declared in a list context; what, if anything, do I get
by including parentheses when declaring a single variable?

Thanks,

--Marc

Reply via email to