in reply to Listing files

This short snippet will return the month and year of whatever file.

#!/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."