in reply to Scoping of my with foreach loop

Other than it won't compile? You need to make that $item.

And yes you could concievably run in to scoping issues. Someone else will correct me if I'm incorrect about this but I believe that if for example, you declare my $item at the top of your program, then it's got global scope. However if that foreach loop was placed in a subroutine then it's going to be local to that routine and you wouldn't have access to it outside the loop.

If both of those are at the top of a script, then there shoudln't be any difference.

Update:Fletch picked up what I failed to take in to account completely about being visible within the foreach loop.

Useless trivia: In the 2004 Las Vegas phone book there are approximately 28 pages of ads for massage, but almost 200 for lawyers.