#!/usr/bin/perl sub crack { $a =~ m/date="(.*)"/; $as = $1; $b =~ m/date="(.*)"/; $bs = $1; return $bs <=> $as; } $/=""; while(<>) { push(@list, $_) if /date=/; } print qq[ qmail http://www.qmail.org Dan Bernstein's qmail en-us qmail http://www.qmail.org/Q.6.01.Logo.small.jpg http://www.qmail.org ]; @items = sort(crack @list); splice(@items, 10); foreach (@items) { s/\n/ /g; s///g; s///g; s!(.*?)!$2!g; if (m!(.*?)!) { $title = $2; $link = "http://qmail.org/top.html#$1"; } else { $title = "Badly formatted, sorry."; $link = "mailto:nelson\@crynwr.com"; } print " $title $link "; } # $_ # rfc822-compatible publication date print " ";