in reply to Re: scope of variables in a sub
in thread scope of variables in a sub

No difference, the data comes from a database and there are no empty records in the source, you can see the variables it populates, printed inside the foreach loop, and then untouched till it's printed outside the loop where it is uninitialized.