Need to write a perl script to open a dir and print out the date of all files last modified. This is what I have but keep getting error...
use File::stat;
open "D,"$ARGV[0]") or die "Can't open dir\n";
while(defined($file = readdir D))
{
next if ! -T $file;
$last_mod = (stat($file))[9] or die "Can't stat\n";
print"$file:\t$last_mod\n";
}
Keep getting "Can't stat"!!! What did I do wrong??? Any help is appreciated....