in reply to Searching a file and then opening it
You have to take a look at stat, opendir, open and File::Find::Rule. By using those mentioned functions and module, you can achieve your target. As planetscape++ said, you have to try to write the code and post the code if you have any problem. Below is a sample code.
use strict; use warnings; use File::Find::Rule; my ($filename, $giventime, $directoryname); my @files = File::Find::Rule->file() ->name( "$filename" ) ->ctime ("< $giventime") ->in( "$directoryname" ); for my $file (@files) { open ($fh, '<', $file) or die ("$!"); }
update: Added code
Prasad
|
|---|