Hello,
I;m havig some broblem with a script i wrote to get newsheadlines from another site.
-they allowed me:-)
But the script has to open 2 differen text files and make into one @headlines.
But this wont work:
@headlines = @listone + @listtwo;
Another problem is, that i then have to go though @headlines, like below: But i want to let the script number each output. go I get a total output like this:
1 - headline one
2 - headline two
foreach my $elem (@headlines) {
my($url,$headline) = $elem =~ m|<A HREF="(.*?)"(?:.*?)>\s*(.*?)\s*</a>|sgi;
$output .= "<br> - <a href=\"$url\">$headline</a>\n";
}
if ($output eq '')
{
$output = "<br>[ no news available ]\n";
Please help me......
I;m havig some broblem with a script i wrote to get newsheadlines from another site.
-they allowed me:-)
But the script has to open 2 differen text files and make into one @headlines.
But this wont work:
@headlines = @listone + @listtwo;
Another problem is, that i then have to go though @headlines, like below: But i want to let the script number each output. go I get a total output like this:
1 - headline one
2 - headline two
foreach my $elem (@headlines) {
my($url,$headline) = $elem =~ m|<A HREF="(.*?)"(?:.*?)>\s*(.*?)\s*</a>|sgi;
$output .= "<br> - <a href=\"$url\">$headline</a>\n";
}
if ($output eq '')
{
$output = "<br>[ no news available ]\n";
Please help me......