in reply to Error POSTing File in Perl

The documentation for WWW::Mechanize specifies that the post method is inherited from that of LWP::UserAgent, which specifies that for advanced things you should see HTTP::Request::Common.
We know that to upload a file via a form, one must specify a Content-Type header of multipart/form-data. Use your browser's search function to find that string, and read that section.

We have now learned that we must also set that header ourselves. Using that information, set this header in your $agent in the usual manner.

HTH,

~Thomas~ 
"Excuse me for butting in, but I'm interrupt-driven..."