If you want to copy each list element into another variable for processing (which is generally the wise thing to do) the usual solution would be foreach my $foo (list_of_stuff).
On an unrelated issue, I betcha that foreach ($u->{loc}) is a bug. $u->{loc} is, and always will be, a scalar, so there's no point in the foreach.
In reply to Re: $_ scoping issues
by DrHyde
in thread $_ scoping issues
by swkronenfeld
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |