http://qs1969.pair.com?node_id=175758


in reply to Creating a txt file with paths to all files

Sounds like a job for File::Find
#! Perl -w use strict; use File::Find; my $fdir='C:'; my @filelist = (); find(\&wanted, $fdir); write_file() if (@filelist); sub write_file() { .... # sub that writes @filelist to a text file } sub wanted { my $thisfile = $File::Find::name; push(@filelist, $thisfile) if ($thisfile =~ m/\.txt/); #for ex +ample }
hth