#!/usr/local/bin/perl my $string = "%-28s %25s %25s\n"; my $count = 0; foreach (@ARGV) { my $atime = (stat($_))[8]; my $mtime = (stat($_))[9]; printf($string, "File Name", "Modified Time", "Access Time") if ($atime && !$count); $atime ? printf($string, $_, scalar localtime($mtime), scalar localtime($atime)) : print "Couldn't access '$_': $!\n"; $count++; }