No it's not more complex, you just won't listen to reason :)

If you start checking those directories from an FTP root, you will be able to check by descending that directory root whether /nonexistant/directory actually exists. Namely, "nonexistant" will not exist in the directory root. I'm speaking algorithmically here, as you have an algorithmic problem, not a Perl module problem.

As for the dir format being inconsistant between servers, any server should include enough for you to regex the beast and tell whether you have a directory or a file. Such is a limitation in FTP, not neccessarily in the Perl module. Dir is only a command that returns text, by definition of FTP. If this really bugs you, try an SFTP module.


In reply to Re: Re: Re: Net::FTP file type and attributes by flyingmoose
in thread Net::FTP file type and attributes by fedelman

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.