Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by flexvault (Monsignor)
on Dec 12, 2015 at 17:03 UTC ( #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

  • Comment on Re^3: question regarding File::Copy, and hashes that contain file paths
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1150125]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2020-09-19 03:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (114 votes). Check out past polls.

    Notices?