Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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
Domain Nodelet?
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 perusing the Monastery: (3)
As of 2022-01-22 00:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (59 votes). Check out past polls.

    Notices?