On the other side I must assume that the 'for each' construct sets it's own scope oppposite to 'for .. next' loops that return a value from the udf for $e if $e is set global ...

A small but significant difference , no ?
_________________________