in reply to Authentication with WWW::Mechanize

Your error messages are a little puzzling:-

How are and related?

Assuming that isn't the result of discrepency between code pasted here and the code run to get those errors, you may want to enable debugging by adding...

use LWP::Debug qw( + ); your script and then re-running it.

This should tell you exactly how submitting a form at is landing you at, and probably provide some vital insight to your problem.