in reply to Mirroring Script
The dirtiest way to do this is:
#!/usr/bin/perl -w use strict; for (1..273) { `wget http://www.my-site.com/mydir/?Page=$_`; }
Implementation is left as a task for the reader.
Update: Beaten to it by moodster! :-) Great minds think alike. ;)
Further update: I feel quite honored to have merlyn's attention :-)
I posted the incorrect/dirty/horrific snippet as a basis of one solution, LWP::Simple is clearly a better solution - and I made a point of mentioning Bundle::LWP, which includes the mirror functionality that merlyn has demostrated.
So, ignoring the obvious benefits of LWP::Simple,
I have seen the error of my ways with the use of backticks here - system() should have been used instead of backticks to fork wget.
That method still isn't fanstatic - I stand by my disclaimer :-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Mirroring Script
by merlyn (Sage) on Feb 05, 2002 at 15:28 UTC | |
by BazB (Priest) on Feb 05, 2002 at 16:51 UTC | |
|
Re: Re: Mirroring Script
by gellyfish (Monsignor) on Feb 05, 2002 at 14:50 UTC |