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 reply to Re: standard library to return system paths by Don Coyote
in thread standard library to return system paths by igoryonya

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.