1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
use Net::FTP; $ftp = Net::FTP->new( "127.0.0.1", Debug => 0 ) or die "Cannot connect to 127.0.0.1: $@"; $ftp->login( "test", 'test' ) or die "Cannot login ", $ftp->message; $ftp->cwd("/tmp") or die "Cannot change working directory ", $ftp->message; $ftp->put("x.pl") or die "get failed ", $ftp->message; $ftp->quit;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Net::FTP>>> Net::FTP(2.77)
Net::FTP>>> Exporter(5.67)
Net::FTP>>> Net::Cmd(2.29)
Net::FTP>>> IO::Socket::INET(1.31)
Net::FTP>>> IO::Socket(1.31)
Net::FTP>>> IO::Handle(1.28)
Net::FTP=GLOB(0x2416264)<<< 220 Lokaler FTP-Server
Net::FTP=GLOB(0x2416264)>>> USER test
Net::FTP=GLOB(0x2416264)<<< 331 Password required for test
Net::FTP=GLOB(0x2416264)>>> PASS ....
Net::FTP=GLOB(0x2416264)<<< 230 Logged on
Net::FTP=GLOB(0x2416264)>>> CWD /tmp
Net::FTP=GLOB(0x2416264)<<< 250 CWD successful. "/tmp" is current directory.
Net::FTP=GLOB(0x2416264)>>> ALLO 352
Net::FTP=GLOB(0x2416264)<<< 202 No storage allocation neccessary.
Net::FTP=GLOB(0x2416264)>>> PASV
Net::FTP=GLOB(0x2416264)<<< 227 Entering Passive Mode (127,0,0,1,203,97)
Net::FTP=GLOB(0x2416264)>>> STOR x.pl
Net::FTP=GLOB(0x2416264)<<< 150 Connection accepted
Net::FTP=GLOB(0x2416264)<<< 226 Transfer OK
Net::FTP=GLOB(0x2416264)>>> QUIT
Net::FTP=GLOB(0x2416264)<<< 221 Goodbye