#!/usr/local/perl-5.6.0/bin/perl -w use strict; use PerlMonks; use PerlMonks::Users; my $n=PerlMonks::Users->new; while(1) { my %u=$n->users; if (exists($u{ZZamboni})) { system(q(echo Get to work | /usr/bin/mailx -s "Shouldn't you be working on your thesis?" zamboni)); if ($ENV{DISPLAY}) { system(q(wmessage -t "What are you doing?" --center "Get back to work!")); } } sleep 300; }