2 ms·
> my $a, $b ... declares a global $b. Not DWIM at all. > Regarding c) I am not a fan of use strict Apparently you also aren't a fan of use warnings, otherwise
by kbenson 14y ago
> my $a, $b ... declares a global $b. Not DWIM at all.
> Regarding c) I am not a fan of use strict
Apparently you also aren't a fan of use warnings, otherwise you would have seen that that my $a, $b doesn't do what you think it does.
# perl -E 'use strict; use warnings; my $a, $b;'
Parentheses missing around "my" list at -e line 1.
What you want is
my ($a, $b);