in reply to Download a file from the web

As other have said, LWP::Simple seems to be the best way to go here. But in the interest of TIMTOWTDI, you could do this if you were on a unix system:

my $pdf_file = `lynx -source $pdf_url`

Replies are listed 'Best First'.
(Ovid) Re: Re: Download a file from the web
by Ovid (Cardinal) on Dec 08, 2001 at 04:52 UTC

    Yes, you could do that. However, this would require heavier data validation to ensure that you're not opening up a whopping security hole by passing things to the shell. I wouldn't do it if there is a reasonable alternative.

    Cheers,
    Ovid

    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.