SGI::FAM

my $monitor_file = '/some/interesting/file.txt';    

my $fam = new SGI::FAM;
$fam->monitor($monitor_file);

while (1) {
    my $event = $fam->next_event;  # blocks here
    print "Heh! $monitor_file has changed\n";
}