#!/usr/bin/perl # # Appwatch (http://www.appwatch.com) # # extract headlines to plain html # # Copyright (c) 2001 Leo Fellermayr use LWP::Simple; $file = "/wwwroot/prinzess.dyndns.org/html/dyndata/appwatch.html"; $url = 'http://static.appwatch.com/appwatch.txt'; $news = get($url) or do { print "error fetching the www.appwatch.com headlines file."; exit(0); }; @news = split /\n/, $news; open (NEWS, ">$datei"); $i = $k = 1; print NEWS "

\n"; foreach $new(@news) { chomp $new; $i++; if (($i-1) % 3 != 0) { if (($k) % 2 != 0) { $desc = $new; } else { $addr = $new; print NEWS "$desc
\n"; } $k++; } } print NEWS "

\n"; close (NEWS);