Yes, you can. But why do you say that this does not change the values
I’m not so up on my Perl, but I would have thought that a Perl script has no concept of how it receives a set of form values, so I would be surprised if this was the problem.
One thing that did cross my mind, however: that browsers do not fire a submit event when a form is submitted via the submit() method.
Could this be the case? Do you have an onsubmit event listener in your code?