#!/usr/bin/perl use utf8; no warnings; $data = `curl -s http://radio.weblogs.com/0101679/gems/mySubscriptions.opml`; $data =~ s/[\r\n]+/ /g; %url = ($data =~ //g); %desc = ($data =~ //g); foreach ($data =~ //g) { s/(\0-\xff)//g; %attr = /(\w+)="(.*?)"/g; next if $attr{xmlUrl} =~ /intertwingly/; next unless $attr{htmlUrl}; $text = lc($attr{title}); $text =~ s/'s.*// unless $text =~ /it's/ or $text =~ /what's/; $text =~ s/ - .*//; $text =~ s/:.*//; $text =~ s/,.*//; $text =~ s/ aka.*//; $text =~ s/ weblog//; $text =~ s/\^weblog for //; $text =~ s/\^the //; $text =~ s/\^www.//; $text =~ s/\.org$//; $text =~ s/\.$//; $text =~ s/(\S* \S* \S* \S*) .*/\1.../; $text = 'ben hyde' if $name =~ /Ascription/; $title = $attr{description} || $name; $title = $name if $title =~ /^http:/; $blogroll{$text} = "$text
\n"; } foreach (sort keys(%blogroll)) { print $blogroll{$_}; }