in reply to Declaring my $var versus declaring my($var)
In your example my($a) = 1; the parentheses impose list context on the assignment, which in this case is OK because you are only assigning a list of one element, but it will make a difference on functions that distinguish between scalar and list context (i.e. localtime).
In your example our(%list) = (); the parentheses around %list are redundant because %list by itseft already enforces list context.
|
|---|