Thread manchmal ist es NICHT einfach ! (21 answers)
Opened by cc at 2004-03-03 11:55

cc
 2004-03-06 00:39
#80528 #80528
User since
2004-01-09
55 Artikel
BenutzerIn
[default_avatar]
hallo kabel

vielen herzlichen dank für deine zeit und die hilfe,
aber das problem besteht immer noch :
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
@ARGV = ("info");
my @ren;
while (<>) { # for every line in info
m/^\s*(\S+)\s+(\S+)\s*$/ or next; #
-f $1 or next; # skip if file to rename does not exist
-f $2 and next; # skip if file to rename does not exist
push @ren, [ $1, $2 ];
$ren[0]->[2] = "/DE/IN";
$ren[1]->[2] = "/DE/OUT";
}
..............
..............
# ftp transfer
my $ftp = Net::FTP->new ($server, Timeout => 9000, Debug => 3);
$ftp or die "$server: cannot connect: $@";
# If you don't use ~/.netrc
$ftp->login ($user,$passwd) or
die "$_: Could not login: " . $ftp->message;


# change remote directory
my ($f1, $f2, $ftp_upload_location) = @$f
$ftp->cwd ($ftp_upload_location);
..............
..............


dann bekomme folgende fehlermeldungen (vorher keine):
[Fri Mar 5 23:06:35 2004] ftp.cgi: "my" variable $f1 masks earlier declaration in same scope at ftp.cgi line 105.
[Fri Mar 5 23:06:35 2004] ftp.cgi: "my" variable $f2 masks earlier declaration in same scope at ftp.cgi line 105.
[Fri Mar 5 23:06:35 2004] ftp.cgi: Scalar found where operator expected at ftp.cgi line 107, near "$f
[Fri Mar 5 23:06:35 2004] ftp.cgi: #...
[Fri Mar 5 23:06:35 2004] ftp.cgi: $ftp"
[Fri Mar 5 23:06:35 2004] ftp.cgi: (Missing semicolon on previous line?)
[Fri Mar 5 23:06:35 2004] ftp.cgi: syntax error at ftp.cgi line 107, near "$f
[Fri Mar 5 23:06:35 2004] ftp.cgi: #...
[Fri Mar 5 23:06:35 2004] ftp.cgi: $ftp"
[Fri Mar 5 23:06:35 2004] ftp.cgi: Global symbol "$ftp_upload_location" requires explicit package name at ftp.cgi line 107.
[Fri Mar 5 23:06:35 2004] ftp.cgi: Execution of ftp.cgi aborted due to compilation errors.

und wenn ich probiere:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
# ftp transfer
my $ftp = Net::FTP->new ($server, Timeout => 9000, Debug => 3);
$ftp or die "$server: cannot connect: $@";
# If you don't use ~/.netrc
$ftp->login ($user,$passwd) or
die "$_: Could not login: " . $ftp->message;

# change remote directory
my ($f1, $f2, $ftp_upload_location) = @$f;
$ren[0]->[2] = "/DE/IN";
$ren[1]->[2] = "/DE/OUT";
$ftp->cwd ($ftp_upload_location);


dann bekomme diese fehlermeldungen, die
my ($f1, $f2, $ftp_upload_location) = @$f; betreffen,
aber transfer findet statt:
und erstes file wird aber zu der falschen directory geschickt,
der zweite aber richtig:

[Fri Mar 5 23:16:36 2004] ftp.cgi: "my" variable $f1 masks earlier declaration in same scope at ftp.cgi line 104.
[Fri Mar 5 23:16:36 2004] ftp.cgi: "my" variable $f2 masks earlier declaration in same scope at ftp.cgi line 104.

Net::FTP=GLOB(0x81e16f8)<<< 220 szhstorage Microsoft FTP
Net::FTP=GLOB(0x81e16f8)<<< 331 Anonymous access allowed, send identity (e-mail name) as password.
Net::FTP=GLOB(0x81e16f8)>>> PASS ....
Net::FTP=GLOB(0x81e16f8)<<< 230 Anonymous user logged in.
Net::FTP=GLOB(0x81e16f8)>>> CWD /
Net::FTP=GLOB(0x81e16f8)<<< 250 CWD command successful.
Net::FTP=GLOB(0x81e16f8)>>> PORT 192,168,0,1,129,78
Net::FTP=GLOB(0x81e16f8)<<< 200 PORT command successful.
Net::FTP=GLOB(0x81e16f8)>>> STOR SN32002041
Net::FTP=GLOB(0x81e16f8)<<< 150 Opening ASCII mode data connection for SN32002041.
Net::FTP=GLOB(0x81e16f8)<<< 226 Transfer complete.
Net::FTP=GLOB(0x81e16f8)>>> QUIT
Net::FTP=GLOB(0x84c6d5c)<<< 220 szhstorage Microsoft FTP
Net::FTP=GLOB(0x84c6d5c)<<< 331 Anonymous access allowed, send identity (e-mail name) as password.
Net::FTP=GLOB(0x84c6d5c)>>> PASS ....
Net::FTP=GLOB(0x84c6d5c)<<< 230 Anonymous user logged in.
Net::FTP=GLOB(0x84c6d5c)>>> CWD /DE/OUT
Net::FTP=GLOB(0x84c6d5c)<<< 250 CWD command successful.
Net::FTP=GLOB(0x84c6d5c)>>> PORT 192,168,0,1,129,80
Net::FTP=GLOB(0x84c6d5c)<<< 200 PORT command successful.
Net::FTP=GLOB(0x84c6d5c)>>> STOR SW32001456
Net::FTP=GLOB(0x84c6d5c)<<< 150 Opening ASCII mode data connection for SW32001456.
Net::FTP=GLOB(0x84c6d5c)<<< 226 Transfer complete.
Net::FTP=GLOB(0x84c6d5c)>>> QUIT

und ich verstehe deine antworten zu punkt 2 nicht,
was deiner meinung falsch ist.
ich würde gerne korriegieren.
es ist äusserst wichtig, dass diese files immer ankommen
und an richtiger stelle bei remote ftp server.

viele grüsse
cc

View full thread manchmal ist es NICHT einfach !