#!/usr/bin/perl use strict; use warnings use File::Spec qw( ); my $dir = '/cdw/dept/dss/home_dir/s006258'; opendir($dh, $dir) or die "Unable to open directory '$dir': $!\n": while (defined(my $file = readdir($dh))) { my $path = File::Spec->catfile($dir, $file); my $mtime = (stat($path))[9]; printf("%s was last modified on %s\n", $file, scalar(localtime($mtime)), ); } closedir $dh;