Re: Net::FTP questions...



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Vincent Arnoux wrote:
Hi,

Le mardi 12 septembre 2006 à 07:39 +0900, Lincoln Anderson a écrit
:
Here's where my problem comes in. How can I tell from the list
array whether an item is a directory or a file to be copied? Is
there something I can use (such as an FTP command) to catch a
clue on how to implement this? I know this is possible, as
ftpmirror is done with PERL and Ruby can do anything PERL can do
- better :)

The output of FTP#ls should be something like : drwxr-x--- 2
login ftp 96 Sep 11 16:07 mydir -rwxr-x--- 2 login ftp
96 Sep 11 16:07 myfile

So you will know an entry is a directory if the string begins by
"d".

Vincent






Yeah, I noticed that after my post... I guess I was trying to
complicate things :)

Thanks,
Lincoln Anderson
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFBsk+Kte2c0P8BH0RAgagAJ99pzUNbgqd4Xla9/NYxXfCqt7ZJgCfc0qd
oC7upPw6SIZTOEMr17A66FE=
=hrJu
-----END PGP SIGNATURE-----


.



Relevant Pages

  • Re: Learning Perl
    ... it should be an array, ... Then they'd be completely inaccessible to beginners. ... that should be my $var. ... so why is it redundant to point out that Perl is different from C here? ...
    (comp.lang.perl.misc)
  • Needless flexibilities and structured records [very long]
    ... One of the more unique features of Perl OO is that there is no such ... return a reference to the hash %hash and ... returns a reference to an anonymous array containing the values 1, ... Any reference can be associated with a package with the help of the ...
    (comp.lang.perl.misc)
  • Re: Which is faster - hash or array lookup
    ... I am suite sure that perl is not The Right Tool ... Each player has 5 pieces, and additionally there is a common ... whereas traversing an array looking for $n is slow). ...
    (comp.lang.perl.misc)
  • Re: perl vs Unix grep
    ... variable indexCount on array and reintialized evry time. ... Perl is langauge to make things work at any cost. ... > grep but the shell scripts that use ... As far as I can tell from reading and research ...
    (comp.lang.perl)
  • Re: Problem with UTF8 and array binding....
    ... There was a time when I had built this great Perl ... Problem with UTF8 and array binding.... ... array bind type must match PL/SQL table row ...
    (perl.dbi.users)