perl2008 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am very new to Perl & need your help. I have a PDF file on a Windows box that is guarded by a layer of software. To get to that manually I need to go to an URL, enter my userid/password, that software sends a cookie (it changes everytime I log in) and then I can get the file. The purpose is to get that PDF file from Windows box to a UNIX machine & store under a specfic directory. Can you please tell how I can achieve this? Thanks. *********************************UPDATE**************************************** I sincerely appreciate your help but I still need some more help. If this is a straight forward download of a PDF file, I can do that but in my case it's different. When I click on the PDF file, it pops a standard "File Download" screen and asks "Do you want to open or save this file?". Once I press the "Save" button, It gives "File name:" & "Save as type:" along with "Save" & "Cancel" buttons. I want to keep the same file name but want to save as "Adobe Acrobat Document". I am stuck & how can I solve this? Thanks again for your help. *******************************************************************************

Replies are listed 'Best First'.
Re: How to copy a PDF file
by MidLifeXis (Monsignor) on Nov 13, 2008 at 16:20 UTC
Re: How to copy a PDF file
by moritz (Cardinal) on Nov 13, 2008 at 16:20 UTC
    The module WWW::Mechanize was written for exactly this kind of task. Take a look at it, read the examples, and try to change them to fit to your situation.
Re: How to copy a PDF file
by gw1500se (Beadle) on Nov 13, 2008 at 16:56 UTC
    Are you saying the file served out by an http server? If so, it sounds like you want to use LWP.