Thanks for all the help. I am actually declaring $errorpile in a script that calls other scripts that will dump their errors into this array.
So, from your advice I declared the variable a GLOBAL and all is well.
Interpreted langauge? Does this mean the scripts are run directly by kix32.exe and the errors come out as the script is being interpreted.
Thanks again