in reply to regular expression for log file date ~ questions and ideas ~
I've become quite fond of POSIX::strftime for this sort of thing:
use POSIX; my $ymdstring = strftime( "%Y%m%d", localtime ); print "looking for log files named *$ymdstring* ...\n"; my @files = <*$ymdstring*>; print join "\n", @files, "";
And of course there are plenty of date-related CPAN modules to supplement the standard modules (such as Time::Local and POSIX) that come with perl.
|
|---|