in reply to Re^4: HTTP::Request(POST, ...)
in thread HTTP::Request(POST, ...)

You will need to understand what the Javascript does, and then program that thing in Perl. There is no Javascript interpreter plus object model for Perl.

In the documentation of WWW::Mechanize::Shell is some hint as to how you can maybe work around this problem.

$agent->current_form->push_input( submit => { name => "submit", value +=>"submit" } );

But most likely, you will have to look at exactly what the Javascript code does. Maybe even $agent->current_form->submit() already works in your case.