#!/usr/local/bin/perl -w use strict; my ($month,$year)=get_month_year("somefile.txt"); print "$month and $year\n"; sub get_month_year { my $file=shift; my @params=stat $file; my @dparams=localtime($params[9]); my $month=1+$dparams[4]; my $year=1900+$dparams[5]; return ($month,$year); }
metadoktor
"The doktor is in."
In reply to Getting File Modification Time - Re: Listing files
by metadoktor
in thread Listing files
by oaklander
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |