in reply to unable to open files in dirs retrived by File::Find

Update. Corion pointed out that $File::Find::name is nothing more than $File::Find::dir/$_..... oops. Maybe the second example will shed some light, but I don't use win32 so there may be slash issues. Sorry it's a groggy morning. :-)

Sometimes its useful to use $File::Find::dir

#!/usr/bin/perl #finds files older than 30 days use warnings; use strict; use File::Find; my $top = shift || "."; find sub {return unless -f; if (-M _ > 30){print "$File::Find::dir/$_\n"} }, "$top";

#!/usr/bin/perl #finds files older than 30 days use warnings; use strict; use File::Find; my $top = shift || "."; find sub {return unless -f; if (-M _ > 30){ my $dirpath = File::Spec->rel2abs( '.' ); print "$dirpath\n"; print "$File::Find::dir/$_\n"; print "$File::Find::name\n"; print "$dirpath\/$_\n\n"; } }, "$top";

I'm not really a human, but I play one on earth. Cogito ergo sum a bum