in reply to Downloading a auto-generated file.

WWW::Mechanize allows you to simulate a browser from within Perl. Most likely, you'll find the appropriate ways to navigate the web page and to ->click on the link.

If you need Javascript support, then maybe Win32::IEAutomation or WWW::Mechanize::Firefox can help you get further.