I spend an insane amount of time today trying to get Perl to print an RFC
822 formatted date (as used in RSS
's <pubDate> element).
Here's a simple solution that worked for me, may it work for you too.
my $date = `date +"%a, %d %b %Y %T %z"`;
# RFC822 format: Thu, 25 Nov 2004 16:44:51 +0100
This uses the regular commandline program 'date' to construct the date. As 'date' adds a newline to that we chomp it off before printing it out to the RSS file (or the terminal in this case).