Where are you doing the Print? When you use My, you are making a local variable. If you try and use that variable outside the block/function where you declared it, it will now be undefined.
I would try testing it right after the assignment, and printing out it's value then. Could be a problem with the uploadInfo call, or with $filename. Basically any params, put in debugs so you're sure what you're passing is what you thought you were.
|