in reply to Re^2: download file by using lwp::useragent POST method
in thread download file by using lwp::useragent POST method

The "site content" and the "file content" are the same.

What you seem to get back is maybe something else and not the file download. Maybe you are not sending the same data as your browser does. Maybe there are cookies or other additional parameters that are hidden that need to be sent.

Consider using the "Developer Tools" of your browser of choice or a network sniffer to inspect what actually gets sent over the wire. Replicate that in your Perl script.

Maybe the returned page contains redirecting Javascript that sends your browser to the real file download URL.

There are many things that might be true in your situation but you are the only person to look at those.

  • Comment on Re^3: download file by using lwp::useragent POST method