#!/usr/bin/perl use strict; use warnings; my $dir = $ARGV[1] || 'C:/devl/bin'; chdir $dir or die "Unable to change directories to $dir : $!"; my $now = time; my $threshold = $ARGV[0] || 300; opendir( DIR , '.' ) or die "Unable to read $dir : $!\n"; for ( readdir( DIR ) ) { if ( abs( $now - (stat($_))[9] ) > $threshold ) { Create_Warning_File(); last; # Unless you want 1 warning per file } } sub Create_Warning_File { # You did not give enough information to fill this in }