you'll have to grab all three (seperate calls), parse out the links, then compile a page from those links.
pseudo code:
page1=grab link1 into variable;
page2=grab link2 into variable;
page3=grab link3 into variable;
define an array of hashs;
parse links from page1 pushing into the array;
parse links from page2 pushing into the array;
parse links from page3 pushing into the array;
weight the array in a sensible fashion;
output page using the array;
| [reply] [d/l] |
need help here..these are my problem areas..
my $new_url = "http://www.google.com/search?q=$a" ;
my $new_url = "http://hotbot.lycos.com/?MT=$a" ;
my $new_url = "http://www.altavista.com/sites/search/web?q=$a&kl=XX&pg=q" ;
# HERE IS ONE TOO. I CAN'T PUSH THE STRING INTO THESE VARIABLES.
open(OUTF,">subject1.html") or dienice("Can't open subject1.html for writing: $!");
open(OUTF,">subject2.html") or dienice("Can't open subject2.html for writing: $!");
open(OUTF,">subject3.html") or dienice("Can't open subject3.html for writing: $!");
| [reply] |
If that really is a code snippet, it looks like you need to take a basic programming course. When you say
my $new_url = "http://www.google.com/search?q=$a" ;
my $new_url = "http://hotbot.lycos.com/?MT=$a" ;
my $new_url = "http://www.altavista.com/sites/search/web?q=$a&kl=XX&pg
+=q" ;
you are assigning three different values to the same place in memory, one after another, without doing anything to them.
If, as others have suggested, this is homework, you should seek help quick. Go immediately to your teacher and show them how far you have got. You may feel stupid doing this, but feeling stupid is part of learning.
On the other hand, if you have a better idea of what your doing than you post seems to suggest, you need to supply some error messages, and MORE CODE, so that the monks can help you further.
- Boldra | [reply] [d/l] |