se strict; use warnings; use Data::Dumper; use Switch; use File::stat; use Time::localtime; use POSIX (); print ("Enter the directory name and date as input arguments:"); my $which_directory; my $which_date; ###$tm = localtime; my $mtime; my $file; $which_directory = $ARGV[0]; print (" The first argument is $ARGV[0]\n" ) ; $which_date = $ARGV[1]; print (" The secnd argument is $ARGV[1]\n"); die("Nothing entered as directory path name\n") if ($which_directory eq ""); die("Nothing enetered as update date\n") if ($which_date eq ""); opendir(DIR,$which_directory) || die "Error in opening dir $which_directory\n"; my @dir = grep { !/^\.+$/ } readdir(DIR); my $i = 0; foreach (@dir) { readdir($ARGV[0] . "/" . $dir[0]); $mtime = (stat ($file))[9]; print " Time--->" . ($mtime).$file . "\n"; print "Last change:\t" . ($mtime).$file . "\n"; $i++; } closedir(DIR);