Simpler TODO RSS feed

Here's a simpler version of Ben Hammersley's RSS feed generator for TODO items - I use it alongside my lab weblog to keep track of things to follow up from previous experiments. This version removes some of the dependencies by not requiring any XML parsers to be installed.

#!/usr/bin/perl -w
# RSS generator for Code TODO comments
# Original version by Ben Hammersley
# at
use strict;
use File::Find;
# y'all be wanting to change the next line
my $start_directory = "/Library/WebServer/Documents/blosxom/docs/";
print <<HEADER;
Content-type: application/xml+rss
<?xml version="1.0" encoding="UTF-8"?>
<rss version="0.91">
find (\&search_and_rss, $start_directory);
sub search_and_rss {
    my $file = $File::Find::name;
    open (CODEFILE, "< $file");
    while (<CODEFILE>) {
        if ($_ =~ m/TODO/) {
            print qq|
                <description>$_ at Line $. of $file"</description>
    close (CODEFILE);
print '</channel></rss>';