perldoc -f readdir
Quote readdir DIRHANDLE
Returns the next directory entry for a directory opened by
"opendir". If used in list context, returns all the rest of the
entries in the directory. If there are no more entries, returns
an undefined value in scalar context or a null list in list
context.
If you're planning to filetest the return values out of a
"readdir", you'd better prepend the directory in question.
Otherwise, because we didn't "chdir" there, it would have been
testing the wrong file.
opendir(DIR, $some_dir) || die "can't opendir $some_dir: $!";
@dots = grep { /^\./ && -f "$some_dir/$_" } readdir(DIR);
closedir DIR;
Also probier mal
#!/usr/bin/perl
use strict;
use warnings;
use Net::FTP;
my $ftp = Net::FTP->new("host.de");
my $path = 'c:/temp';
die "Konnte keine Verbindung aufbauen $!" unless $ftp;
$ftp->login("name", "passwort");
opendir(DIR, $path);
my @inhalt = readdir(DIR);
$ftp->put($path . '/' . $_) for @inhalt;
$ftp->quit;
\n\n
<!--EDIT|Crian|1132664291-->
s--Pevna-;s.([a-z]).chr((ord($1)-84)%26+97).gee; s^([A-Z])^chr((ord($1)-52)%26+65)^gee;print;
use strict; use warnings; Link zu meiner Perlseite