#!/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 =~ /<font color=white>User Questions<\/font>.+?<a hre +f=\"\/index\.pl\?node_id=\S+\">(.*?)<\/a>/is) { compare($1); } } sub compare { my $curquestion = shift; if ($question ne $curquestion) { $question = $curquestion; &act; } } sub act { system "xmessage \"New PerlMonks Question: $question\""; }
In reply to RE: seeker watch
by kilinrax
in thread seeker watch
by vladdrak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |