"Part of my point in writing all these different versions of A is to demonstrate that choosing the same name for a scalar and an array is confusing. It is much more readable to have distinct, concise, yet descriptive names."Is it also not a good idea to use the same name for scalar and array in a loop? I tend to do this all the time
UPDATE:lol, what a blunder. I guess I use this construct so much that these names look the same to me (aside from having a different sigil), whereas they really are different.foreach my $item (@items){ ... }
In reply to Re^3: Perl list items
by monsoon
in thread Perl list items
by robertw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |