##################### # # # Slashdot.pl for # # SlashDot headline # # retrival # # tessone@imsa.edu # # Chris Tessone # # Licensing: # # Artistic License # # (as perl itself) # ##################### use strict; my $no_slashlines = 0; BEGIN { eval "use LWP::UserAgent"; $no_slashlines++ if $@; } sub getslashdotheads { return '' if $no_slashlines; my $ua = new LWP::UserAgent; $ua->timeout(12); my $slashindex = new HTTP::Request('GET','http://www.slashdot.org/'); my $response = $ua->request($slashindex); if($response->is_success) { my $flathtml = $response->content; my @indexhtml = split(/\n/,$flathtml); foreach(@indexhtml) { next unless(/^