#!/usr/bin/perl use Mail::Sendmail; # # Get the Article of the Day from Wikipedia and email it to someone # # NEEDS: # In order for this script to work properly (without modification), you'll need a couple of things # * Mail::Sendmail perl module # * cron (if you want this to be sent to you daily without you thinking about it # * wget # # For windows users, all of this is available under the Cygwin packages. # # # Change $to to reflect where you want the message to be sent # $to = 'firstEmail@foo.com, secondEmail@bar.com, etc..'; # # Change $from to reflect your email address # $from = 'youraddress@email.com'; $subject= "Featured Wikipedia Article of the day"; $wget = "/usr/bin/wget"; ## ## ## Shouldn't need to change anything below.... ## ## $data = `$wget -q -O - http://www.wikipedia.com`; $data =~ s/\n/@@/g; $data =~ s/img src=(@@)*"/img src="http:\/\/en.wikipedia.com/g; $data =~ s/a href="/a href="http:\/\/en.wikipedia.com/g; $match = ""; if ($data =~ /