Perl Script to download files (Need Help)

N

NZJAV05

Hi, I am completely new to using perl and I was wondering if I could
take just 2 min of you time to help me here...

I haven't used a perl script before, but I was wanting to know if
there is a script out there that can download files from a url ? and
if so, where can I download it... ?

Last question, how do I initiate the script ?


Sorry about the noob questions, but yeh, I am stumped....



Cheers,


Adam
 
J

Josef Moellers

Hi, I am completely new to using perl and I was wondering if I could
take just 2 min of you time to help me here...

2min times several hundred people ...
I haven't used a perl script before, but I was wanting to know if
there is a script out there that can download files from a url ? and
if so, where can I download it... ?

There are numerous scripts that can do that.
Why not write it yourself? It's not _that_ complicated, e.g. using
LWP::Simple, and you'll learn a lot trying. If you have problems getting
it to run, post your attempts here and we'll help getting you on-track
again.
Last question, how do I initiate the script ?

Depends on the script.
Sorry about the noob questions, but yeh, I am stumped....

BTW There are a couple of stand-alone (non-Perl) programs that can be
used to download files, e.g. wget or curl. Any specific reason why it
has to be Perl? Maybe the assignment specified Perl as the
implementation language?
 
M

Mirco Wahab

Hi, I am completely new to using perl and I was wondering if I could
take just 2 min of you time to help me here...

I haven't used a perl script before, but I was wanting to know if
there is a script out there that can download files from a url ? and
if so, where can I download it... ?

Last question, how do I initiate the script ?

Thats not really a Perl question, a simple
invocation of 'wget' (Unix/Linux/Windows)
will help a lot:

$> wget --referer="http : //www.moqawama.org/" \
-U "IE/6" \
https : //www.cia.gov/careers/jobs/operations_off_special.html


The above will download said page (after removing spaces).


Regards

M.
 
J

Jürgen Exner

I haven't used a perl script before, but I was wanting to know if
there is a script out there that can download files from a url ? and
if so, where can I download it... ?

Your Question is Asked Frequently.
perldoc -q HTML:
"How do I fetch an HTML file?"
Last question, how do I initiate the script ?

You execute it? Just like any other program or script written in any other
programming language.

jue
 
J

john.swilting

Josef said:
2min times several hundred people ...


There are numerous scripts that can do that.
Why not write it yourself? It's not _that_ complicated, e.g. using
LWP::Simple, and you'll learn a lot trying. If you have problems getting
it to run, post your attempts here and we'll help getting you on-track
again.


Depends on the script.


BTW There are a couple of stand-alone (non-Perl) programs that can be
used to download files, e.g. wget or curl. Any specific reason why it
has to be Perl? Maybe the assignment specified Perl as the
implementation language?
lwp-get
libnet
 
J

Joe Smith

I haven't used a perl script before, but I was wanting to know if
there is a script out there that can download files from a url ? and
if so, where can I download it... ?

Yes, several come with the perl installation.
Last question, how do I initiate the script ?

Linux install: Perl is part of most distributions; installed already.
Linux command: bash% GET 'http://www.example.com/x/foo.cgi?bar=yes'

Windows install: http://www.activestate.com or http://www.cygwin.com
MS-DOS command window: C:\> GET "http://www.example.com/x/foo.cgi?bar=yes"
cygwin command: same as Linux

-Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top