#!/usr/bin/perl5
BEGIN {
my $homedir = (getpwuid($>))[7];
my $n_inc = scalar @INC;
for (my $i = 0; $i < $n_inc; $i++) {
if (-d $homedir . '/perl' . $INC[$i]) {
unshift(@INC,$homedir . '/perl . @INC[$i]);
$n_inc++;
$i++;
}
}
}
use strict;
use HTTP::Date;
use LWP::Simple;
use XML::RSS;
my $p1 = get("http://www.gaiaonline.com/forum/c-t-tech-talk/what-i-have-learned-from-c-t/t.804547_1/");
$p1=~m:\Q:s;
my $lpn = $1;
$_ = get("http://www.gaiaonline.com/forum/c-t-tech-talk/what-i-have-learned-from-c-t/t.804547_$lpn/");
if(!$_){
print "Error getting page. Exiting.\n";
exit(1);
}
print "Getting posts from $lpn\n";
my @posts = ();
while(/\Q.*?\Q(.*?)<\/span>.*?\Q(.*?)