my $basepath = "C:/where/to/start"; open ( FIND, "-|", "find $basepath -print0 ..." ) or die "can't start find: $!"; $/ = chr(0); while () { chomp; # $_ is a path name that can be used with stat, etc }