in reply to stream results directly to a file
Just from looking at the documentation to File::Find::Rule, I'd say something like this:
(Completely untested of course - I don't even have F::F::R installed...)my $rule = File::Find::Rule->new; $rule->file; $rule->name( '*.tmp' ); #find all xml files $rule->mtime("<$timeback"); my $file = "output.log"; open(OUT, ">$file"); $rule->start($startdir); while (my $file = $rule->match()) { print OUT $file, "\n"; ## move and tar it here } close(OUT);
|
|---|