How to find 1 day old file on Windows for Active Perl

How to find 1 day old file on Windows for Active Perl?
Is there anyone know the method?
If UNIX or LINUX, we can use the "find ...". How to we do for Windows?

I'm confused.. are you asking how to find a file using the Windows operating system or how to find a file using the Perl programming language?

If it's Windows, then which version?

If you go to start-->find(or search if it's xp), you can choose advanced search, and specify x days ago.
If you are tring to do it through Perl, from Orielly's Learning Perl:
"The Perl operator -M returns the age in days since a file or filehandle has last been modified"

Sorry for the confusion.
When we use Perl running in UNIX, we can use the below command to search the one day old file.
@Files = qx/find . -name '*' -mtime -1 -print/;

The problem I am facing now is I am trying to do the same thing but under Windows platform through Active Perl (window based).
I have tried using windows, but it seems the script will be very long because you need to capture the last date modified file and compare the date with current date.

Is there any other solutions?
It is much better if I can use 1 line of command like UNIX (eg. find) on the Window based Perl.

Thank you.:frowning:

I created a small perl script .. see if it works for you:

#!C:\Perl\bin\perl.exe
 use File::Find;
 my @oldFiles;
 print "Content-type: text/html\n\n";
 find(\&cleanup, "C:\/WINDOWS/Temp/");
 sub cleanup {
   my $daysOld = ((time - +(stat($_))[9]) / 86400);
   if (/\./ && $daysOld >= 1 && $daysOld < 2) {
      push(@oldFiles, $File::Find::name);
   }
 }
 print @oldFiles;

If you want to search an entire drive, replace C:\/WINDOWS/Temp/ with C:\\

References:

http://techupdate.zdnet.co.uk/story/0,,t481-s2122110,00.html
http://techupdate.zdnet.co.uk/i/z/tu/tr/2002/listinga110902.htm

http://www.xav.com/perl/lib/Pod/perlfunc.html#item_stat