|
|
| P is for Practical | |
| PerlMonks |
itterator variable in a LWP-UA-code snippetby Perlbeginner1 (Scribe) |
| on Oct 31, 2010 at 11:41 UTC ( [id://868567]=perlquestion: print w/replies, xml ) | Need Help?? |
|
Perlbeginner1 has asked for the wisdom of the Perl Monks concerning the following question:
good morning dear monks!
I'm new to programming and i am trying to learn the basics of the PERL.At the moment i digg into the Perl LWP::UserAgent. note; This first mentioned code below runs and give me back the content of the parsed site: what i want is to enter a loop in the argument that fetches the url. In other words - i want to itterate over some hundreds of targets...
as mentioned above: the code runs well and nicely: i want to build in a loop to fetch more pages. Well i want to fetch pages from http://dms-schule.bildung.hessen.de/suchen/suche_schul_db.html?show_school=01 to http://dms-schule.bildung.hessen.de/suchen/suche_schul_db.html?show_school=10000 - the one that have no results i want to drop (but that has to be done later with some additional code. For the proof of concept i want to get all the urls - let us say printed out that the LWP::userAgent fetches... the quesions are: 1. how to enter the loop in correct way. 2. how to make the prorgamme to print out all the URLs that are fetched. (later on i want to parse the sites with content) but thats a part that i have do design and code later on. Here the code that has a build in loop - to make USER-Agent to itterate over a bunch of targets. # first get a list of all schools
do you have any idea how to insert the loop correctly - and how to get the programme to print out all the urls (not the content)!!! Please let me know if i have do be more descriptive! many thanks! Perlbeginner1
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||