in reply to Garbage Collection

Since none of the variables in your FormData sub are global, they will go out of scope when the sub returns. If you are, however, wanting to free global vars that don't go out of scope, see undef() and/or delete().

I think the: "How can I free an array or hash so my program shrinks?" section of the Perl faq covers this.