in reply to Global Variables Not Acting Global
Do you expect $CurIDPtr to keep its value through multiple invocation of your script?