I've been coding Perl since LWall posted in comp.lang.perl (a long time), and years ago I settled on a consistent coding style where modifiers are always followed by a parenthetical list, regardless of the number of variables being declared:
my($a) = 1; my($b,c,d); our(%list) = (); local(*p);Now, in my old age, I'm wondering if I've been making the parser work extra hard, or even causing less efficient code to be generated. So, better late than never, I'm wondering: is there any practical difference between using parenthesis for a single variable declaration (my($var);) and omitting them (my $var;)?
--
DaveH (dh1760)
In reply to Declaring my $var versus declaring my($var) by dh1760
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |