Blob
1 #!/usr/bin/perl3 # Write a program to make a report of the access and modification4 # times (in the epoch time) of the files in the current directory.5 # Use stat to get the times, using a list slice to extract the6 # elements. Report your results in three columns, like this:7 #8 # fred.txt 1294145029 12908805669 # barney.txt 1294197219 129081003610 # betty.txt 1287707076 127443331012 use v5.24;13 use warnings;14 use strict;15 use utf8;17 for (glob '.* *') {18 my ($atime, $mtime) = (stat $_)[8,9];19 printf "%-16s %d %d\n", $_, $atime, $mtime;20 }