#!/usr/bin/perl -w use strict; use LWP::Simple; use constant URL => 'http://spanish.about.com/homework/spanish/blword.htm'; my $today = (localtime)[3]; my $page = get(URL) or die "can't download page.\n"; # grab today's entry. my($entry) = $page =~ m/if \(day == $today\) [^\(]+\(\"([^\"\);]+)/; # remove markup. $entry =~ s/<[^>]+>//g; my($word,$def, $sentence, $trans) = $entry =~ m/([^:]+):([^\.]+\.)([^,]+),(.*)/; print "word: $word\n"; print "definition: $def\n"; print "sentence: $sentence\n"; print "translation: $trans\n";