I can't help wondering why you are using WWW::Mechanize where probably LWP::Simple with getstore would likely do. After all you seem to be only fetching a file from an URL... No login, no navigating towards a download page.
in reply to Perl Issue - File downloaded in windows has a Control M character in it??
I am guessing WWW::Mechanize assumes HTML, thus, text contents, and treats it that way. getstore, on the other hand, saves (all) files as binary by default.
update From the WWW::Mechanize docs:
$mech->save_content( $filename )
And no way to override it. Nice.
Dumps the contents of $mech->content into $filename. $filename will be overwritten. Dies if there are any errors.
If the content type does not begin with "text/", then the content is saved in binary mode.