Dear Monks,
Here is the code I have a question about:
sub do_stuff { my($x) = ($_[0] || 0); ... }
Do the parentheses around $x do anything? It seems to me that the rhs will always be a scalar, and these are equivalent:
my $x = 10; print $x, "\n"; my ($y) = 10; print $y, "\n"; --output:-- 10 10
In reply to list context by 7stud
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |