I'm using module Net::Ftp.
My code is simple (maybe too simple :-) )
Expand|Select|Wrap|Line Numbers
- #!/usr/bin/perl
- use Net::FTP;
- my $ftp_host = 'ftp.tvnet.com.pt';
- my $ftp_user = 'estreias';
- my $ftp_pwd = 'cinema';
- my $ftp = Net::FTP->new($ftp_host, Debug => 0)
- or die "Cannot connect to $ftp_host: $@";
- # login::password
- $ftp->login($ftp_user,$ftp_pwd)
- or die "Cannot login ", $ftp->message;
- # file to transfer
- $ftp->put("/home/joao/Desktop/output.3gp")
- or die "get failed ", $ftp->message;
- $ftp->quit;
The problems is that I can't open the file. I get errors like the file is corrupted or something like that for every file I try to send. I already tested video files (its what I need to send), but also text files and it doesn't work either.
If I put the same file in the ftp server with Filezilla, for example, it works fine.
Can someone give me some light here, please?
Thanks a lot,
Joćo