I sometimes see Perl code like this:
my ( $variable ) = blah....
What is the point of putting parentheses around a single variable? I thou
I'm not a Perl pro (by all means, I'm not), but AFAIK it has to do with lists.
Perl has different contexts (scalar, list). Using ($var) switches to list context, $var is scalar context.
my $var = (1, 2, 4); # $var = 4 (last element)
my ($var) = (1, 2, 4); # $var = 1
Please downvote this answer, if it is totally wrong :)