Perl Monk, Perl Meditation | |
PerlMonks |
How can I readdir and ! -d in one lineby misterperl (Pilgrim) |
on Oct 27, 2020 at 16:08 UTC ( [id://11123216]=perlquestion: print w/replies, xml ) | Need Help?? |
misterperl has asked for the wisdom of the Perl Monks concerning the following question:
I need to readdir non-dot files, and non-directory files. I have :
which gets the job done, @F is correct, but its so wordy! Can I use a ! -d "$myDir/$" somehow in the readdir line with the grep to do all my filtering at once? TY wise ones.
Back to
Seekers of Perl Wisdom
|
|