The reason to set after? To eliminate code redundancy. I have an existing, fairly complex subroutine and I have since added other functionality. The existing way takes input via a form submission, the new way adds a feature to "submit" via email. I want to share the same code between the two (one block of code to process email attachments the same way as file uploads via form). So, before I pass the CGI object to that existing subroutine I set everything the same way the form submission would. Works great... except file uploads.