#!/usr/bin/perl -w use strict; use LWP::Simple; my $poll = 60; my $question = {}; { &watch; sleep $poll; redo; } sub watch { my $content = get('http://perlmonks.org/index.pl?node=Seekers%20of%20Perl%20Wisdom'); if ($content =~ /User Questions<\/font>.+?(.*?)<\/a>/is) { compare($1); } } sub compare { my $curquestion = shift; if ($question ne $curquestion) { $question = $curquestion; &act; } } sub act { system "xmessage \"New PerlMonks Question: $question\""; }