hi dear perl-monks
again me- well
i have started another thread since i have issues with
the ports. But that is another story:
first of all; i run linux opensuse 11.4 i try to run this little programme on a linux box.
#!/usr/bin/perl
use WWW::Mechanize::Firefox;
my $mech = WWW::Mechanize::Firefox->new();
open(INPUT, "urls.txt") or die "Can't open file: $!";
while (<INPUT>) {
chomp;
$mech->get($_);
my $png = $mech->content_as_png();
}
close(INPUT);
exit;
well i have a list of URLS: i have more than 1000 URLS - so it might be a problem if i get the results in a unsorted way.
i have a list of 1000 URLs, one on each line, saved in a file. then i want the script above to open the file, read a line, then retrieve the website! Well the URLS are stored something like this:
Filename: urls.txt
------------------
www.google.com
www.cnn.com
www.msnbc.com
news.bbc.co.uk
www.bing.com
www.yahoo.com
question: how to write the script that the output of the thumbnail-images are stored with certain names - eg with the domain-names. How to do that!?
otherwise - the resuults would be a whole mess. I need to identify the thumbnails - related to the URLS. :Is this possible!?
love to hear from you
beginner1
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.