good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: standard library to return system pathsby Don Coyote (Hermit) |
on Jun 07, 2016 at 06:12 UTC ( [id://1165030]=note: print w/replies, xml ) | Need Help?? |
Hello igoryonya Can you clarify which paths you intend to Find? Standard paths will vary on an application by application basis. Standard paths for a nix could be found by readdir('/'), which is what I understand by your question. Or grep a self-created list against File::Find You may also need to ensure you have permission to read the directories on either system, Errors can be generated if you do not have said permissions. Not knowing the paths you are looking for, you could use Find::lib module, that iirc will return the absolute filepath for the currently running program, from which you can use relative links within your program rather than trying to discern and hard-code standard paths for many different machines. less roam; more sell.
In Section
Seekers of Perl Wisdom
|
|