in reply to getting file size and date
If you could talk those through in English, I might be able to help.$file =~ s/$dir\///g; $dir =~ s/\//\\/g;
However, if your intent is to get just the basename, be aware that $_ already has that. Simplifying your code, I'd just go with this:
find sub { return unless -f; my $size = -s; print "file: $_\n", "dir: $File::Find::dir\n", "size: $size\n"; }, $rootdir;
-- Randal L. Schwartz, Perl hacker
|
|---|