I am using File::Find module to travese the directory and list the all the xml files in that directory. Below is the code
find(\&print_xml_files, @project_paths); sub print_xml_files { return unless $File::Find::name =~ /(.*)\.xml$/ig; print FOUT $File::Find::name ."\n"; }
Now i need to have only the first file listed in each directory instead of all the files. How can i implement this using the existing code, otherwise i need to rewrite the entire logic...i dont want to waste time, when i have peoples to suggest new good things..
Please advice....
In reply to File::Find Questions by kprasanna_79
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |