Not really.

Net::FTP supports a command called dir() which can give you a detailed list of remote entities, that clearly indicate whether the entity is a directory or a file. I tested with the following code, local win2k, remote unix (trust that you will get a similar list if remote is non-unix):

use Data::Dumper; use Net::FTP; $ftp = Net::FTP->new("blah", Debug => 0) or die "Cannot connect: $@"; + $ftp->login("foo",'bar') or die "Cannot login ", $ftp->message; my @list = $ftp->dir(); print Dumper(\@list); $ftp->quit;

I got something like (only a portion):

'drwxr-xr-x 7 leinbd aagdev 512 Oct 17 18:06 leinb +d', 'drwxr-xr-x 11 lois aagdev 1024 Nov 14 14:04 lois' +, 'drwx------ 2 root system 512 Nov 10 15:41 lost+ +found', 'drwxr-xr-x 2 maynec aagdev 512 Nov 20 10:05 mayne +c', 'drwxr-xr-x 10 nanayn aagdev 512 Oct 07 09:52 nanay +n', 'drwxr-xr-x 5 root system 512 Nov 10 15:41 netin +st',

In reply to Re: Net::FTP file type and attributes by pg
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.