in reply to getting file size and date

Consider using the built in cache for stat operations, '_'. The initial -f populates the cache. Like so (I have made no attempt to optimize your code...consider merlyn's advice, but add in a date capture:

#!/usr/bin/perl use File::Find; $rootdir = "testdir"; find(sub { if (-f) { $file = $File::Find::name; $dir = $File::Find::dir; ($size,$date) = (stat _)[7,9]; $sz = -s _; $file =~ s/$dir\///g; $dir =~ s/\//\\/g; print "file:$file\ndir:$dir\nsize1:$size\nsize2:$sz\ndate:$date\n"; }}, $rootdir);

Matt