Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: question regarding File::Copy, and hashes that contain file paths

by flexvault (Monsignor)
on Dec 12, 2015 at 17:03 UTC ( [id://1150125] : note . print w/replies, xml ) Need Help??


in reply to Re^2: question regarding File::Copy, and hashes that contain file paths
in thread question regarding File::Copy, and hashes that contain file paths

Leetsauce,

You can test for file or directory by:

if ( -f $file ) { .... } ## $file is a file elsif ( -d $file ) { ... } ## also could use '_' for speed else { ,,, } ## Not what we're looking for
Also you may wish to look at 'glob' for getting information about directory contents ( files and/or directories ).

Good Luck...Ed

"Well done is better than well said." - Benjamin Franklin