#!/usr/bin/perl -w use strict; chdir "$ENV{HOME}/mail/IN" or exit 0; my @boxes = sort grep { $_ !~ /trash/ } glob ("*"); do { my @list; foreach my $box (@boxes) { my ($a, $m) = (stat($box))[8, 9]; if ($m > $a) { push @list, $box; } } if (@list) { print join(" ", @list) or exit 0; $| = 1; } } while (sleep 10);