in reply to Net::FTP file type and attributes

If you can't change the working directory, it's not a directory.
print "file" if not $ftp->cwd($filename);
If you can change the working directory, you may have to change back to the parent or starting directory at some point after your query.

--
[ e d @ h a l l e y . c c ]

Replies are listed 'Best First'.
Re: Re: Net::FTP file type and attributes
by fedelman (Novice) on Jan 22, 2004 at 21:09 UTC
    Hi, thanks for your reply.

    If the $filename is a file (with the same name of SRC directory) or if the $filename is a directory and his permissions is not suitable, the $ftp->cwd($filename) will be fail.