#!/usr/bin/perl my($contentblock) = 0; my($what) = 0; my(@news); @lines = <>; foreach (@lines) { chomp; if ($_ eq "") { $contentblock = 1; next; } if ($_ eq "") { last; } if ($contentblock == 1) { if (/

/) { # headline /(.*)<\/a>/; $url = $1; $headline = $2; $headline =~ s/&/&/g; push (@news,$headline); push (@news,$url); } elsif (/

/) { # article $desc = substr ($_, 3); $desc = (split(/\n". "\n". "\n". " heise online news\n". " http://www.heise.de/newsticker/\n". " Nachrichten aus der Welt des Computers\n". "\n"; $what = 0; foreach (@news) { if ($_ eq "") { next; } if ($what == 0) { print "\n$_\n"; $what = 1; next; } elsif ($what == 1) { print "http://www.heise.de$_\n"; $what = 2; next; } else { print "$_\n\n"; $what = 0; } } print "\n";