Miscellany
public text v1 · immutable#!/usr/bin/perl
use CGI;
use POSIX qw(strftime);
use XML::RSS;
use Getopt::Long;
my %CONFIG;
if (open(CONF, "/etc/rssgen.conf")) {
while ($line = <CONF>) {
chomp ($line);
if ($line =~ /^\s*\#/) { next; }
if ($line =~ /^\s*(\w+)\s*=\s*(.*)\s*$/) { $CONFIG{$1} = $2; }
}
} else {
die("Unable to open config file -- $!\n");
}