This is what i did:#!/usr/local/bin/perl
require "admin/links.cfg";
require "$db_script_path/links.def";
require "$db_script_path/db_utils.pl";
require "$db_script_path/Template.pm";
use lib '/usr/libdata/perl5/site_perl';
use LWP::Simple;
print "Content-type: text/html\n\n";
$news = get qq!http://newsclicker.com/wire/?18202&501/!;
while ($news =~ m#<a href="([^"]+)">([^<]+)</a>#sog) {
($url, $title) = ($1, $2);
print &load_template ('news.html', {
url => $url,
title => $title
});
}
but the script is creating one news.html page for each headline instead of putting all of them into one single page.
What's for finishing this script?
For a better idea, access this test page:
http://budosearch.cjb.net/links/news2.cgi
Thanks!
Dudu
require "admin/links.cfg";
require "$db_script_path/links.def";
require "$db_script_path/db_utils.pl";
require "$db_script_path/Template.pm";
use lib '/usr/libdata/perl5/site_perl';
use LWP::Simple;
print "Content-type: text/html\n\n";
$news = get qq!http://newsclicker.com/wire/?18202&501/!;
while ($news =~ m#<a href="([^"]+)">([^<]+)</a>#sog) {
($url, $title) = ($1, $2);
print &load_template ('news.html', {
url => $url,
title => $title
});
}
but the script is creating one news.html page for each headline instead of putting all of them into one single page.
What's for finishing this script?
For a better idea, access this test page:
http://budosearch.cjb.net/links/news2.cgi
Thanks!
Dudu