Hello dear Perl-monks - good evening!
well i am currently workin on a parser that should fetch pages: i want to do it with Perl since this is the most pretty way to do it!
well - i have to build a loop since i need to fetch many pages from one server:
siteone_dot_com?show_subsite=9009
siteone_dot_com?show_subsite=9742
siteone_dot_com?show_subsite=9871
Should i do it like this?
for my $i (0..10000) {
$ua->get('siteone_dot_com?show_subsite', id => , extern_uid => $i);
# process reply
}
Well i am not sure bout the string concatenation. How to do it - Note i want to fetch several hundred pages:
see the some details for this target-server sites - /(i have to create a loop over several hundred sites)
siteone_dot_com?show_subsite=9009
siteone_dot_com?show_subsite=9742
siteone_dot_com?show_subsite=9871
...and so on and so fort...
Question: How to appy this loop into the code!?
use strict;
use warnings;
use WWW::Mechanize;
use File::Basename;
my $m = WWW::Mechanize->new;
$m->get("the domain name ");
love to hear from you!
regards
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.