in reply to readdir
i would like to read only the file name that begin with xxxx
Um, you want to read the file names without reading them? Perhaps this would be more helpful ;)
Okay, perhaps you mean that you want to return only those files whose titles match 'xxxx'. Try:
my @new_files = grep $_ =~ /^xxxx/, @files;
This will grep the list, setting $_ equal to each element in @files, and looking for matches that begin with the string you want. Then you can resume your processing, presumeably reading only those files.
HTH.
|
|---|