matgold
asked on
file listing excluding directory
chdir "d:/temp";
@files = grep { ! /\./ } glob "abc*" ;
with the code above, how do I exclude sub-directory
@files = grep { ! /\./ } glob "abc*" ;
with the code above, how do I exclude sub-directory
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
and you could also merge both the grep's into one.
ASKER
basically, I want a list of all files without the extention and make sure is not a directory.
thanks
thanks
#with
grep { !/^\./ } glob "abc*"
#the grep will always be true
grep { !/^\./ } glob "abc*"
#the grep will always be true
Ozo's right, of course! What was I thinking?
ASKER
are you saying I don't need "grep { ! -d } " ?
No, that's the part the eliminates the subdirectories.