Thread FTP mit Perl (21 answers)
Opened by Rafael at 2006-09-11 13:39

fraggs
 2006-09-11 17:41
#69672 #69672
User since
2006-09-11
179 Artikel
BenutzerIn
[Homepage] [default_avatar]
alles ge chomp 't und auch
Quote
$ftp = Net::FTP->new($host, Debug => 0)
    or die "Cannot connect to $host: $@";
eingebaut

nun habe ich das hier

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
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/perl

use strict;

use warnings;
use Net::FTP;

my $host = "";
my $user = "";
my $pass = "";
my $option = 0;
my $option_2 = 0;
my $ftp = "";
my $login = "";

print "Bitte wählen Sie: \n1 Anonymer Login \n2 Eingabe von Benutzerdaten \nIhre Wahl: ";
$option = <STDIN>;
if ($option == 1){
$user = "anonymous";
$pass = "anonymous\@anonymous.com";
};
if ($option == 2){
print "\nBenutzername: ";
$user = <STDIN>;
chomp($user);
print "\nPasswort: ";
$pass = <STDIN>;
chomp($pass);
}
else {print "anonymous login selected\n"};
print "\nHost: ";
$host = <STDIN>;
chomp($host);
$ftp = Net::FTP->new($host, Debug => 0)
    or die "Cannot connect to $host: $@";
$ftp->$login($user, $pass);


schmeist mir einen error

Quote
Cannot connect to 127.0.0.1: Net::FTP: connect: Unknown error at ftp.pl line 34,
<STDIN> line 4.


woher kommt der <STDIN> line 4 error ? ist das der host input ?

EDIT: Doh ftp war nicht an bin auf der arbeit kann nichts isntallieren werde heute abend nochmals testen\n\n

<!--EDIT|fraggs|1157982249-->
mmm twix

View full thread FTP mit Perl