You can use stat to get the last modification time (that's what ls reports) and then localtime to find out what year that was.
my $filename = 'your_file_name_here'; my $mtime = (stat $filename)[9]; my $year = (localtime $mtime)[5] + 1900;
In reply to Re: extracting year of a file
by kyle
in thread extracting year of a file
by Banshee06
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |