in reply to Do I need a setuid script ?

"Can't use an undefined value as a symbol reference" is a runtime errors. There are lots of ways to cause a runtime error. Some relate to permissions, some don't. If you're able to create the SWF (even if it ends up empty), chances are good that you'll be able to complete the task without resorting to Setuid.

Debugging 101 says to figure out what is undefined and why. It might help to do that before you starting throwing potential solutions around. If TemporaryBag.pm is one of yours, consider posting part of it. Lines 190-210 might be nice.