in reply to WWW::Mechanize : how to download witout changing location ?
My first guess is that your website sends a unique cookie along with HTML form to be submitted. So, you should probably initialize WWW::Mechanize with a corensponding cookie jar.
Also, show us some code, it's more than welcome here and it can be a better way of solving your problem.
In Section
Seekers of Perl Wisdom