good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Finding files excluding someby david.paige (Initiate) |
on Mar 30, 2009 at 22:08 UTC ( [id://754262]=perlquestion: print w/replies, xml ) | Need Help?? |
david.paige has asked for the wisdom of the Perl Monks concerning the following question:
I have been reading through the File::Find threads trying to find an answer to this question, but wasn't able to quite find it.
I want to write the equivalent of this ksh command in perl:
which should find all files, except those of .a or .o I am willing to redirect them to a file, and then read that into a file. (It was difficult for me to follow the redirections for Find::File.) I was able to get fully qualified pathnames with File::Find, but wasn't able to exclude certain extensions, and I didn't quite follow some of the redirecting of standard output. If I change the default for standard output, does it revert at some point, or do I have to manually reset it? What just occurred to me now, is the not completely elegant solution of running a ksh script, doing the file find, and then running the perl program, reading the file list from standard input. Maybe that would be easiest....
Back to
Seekers of Perl Wisdom
|
|