Why do you want to set the field after it has been submitted? You can set a new value. The uploaded files are treated special by CGI.pm and I don't think you can set those (and I don't see a reason why you would want to).
| [reply] |
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.
| [reply] |
Perhaps you could write the existing code to accept some data structure other than a CGI object. Then in the CGI that uses it, have something "convert" the CGI object you have into the data structure the new code takes. In your email processing code, you pass data in with the new structure directly.
| [reply] |