Subject: | Bug on AIX v1.19 => unique_name and put_unique function |
Hello, I try to use FTP::Net on my AIX v5.1 server with Perl 5.6.0 and I had a problem with the unique_name and put_unique functions : it return anything (normally, it should return the name of the unique file, I think...)
Thanks by advance for the help !
Thomas
Here is the simple script I try to execute :
#!/usr/bin/perl
use Net::FTP;
@files = @ARGV;
$remotehost = "myserver";
$remotedir = "/tmp";
$user = "myuser";
$pass = "mypass";
print "Connecting...\n";
$ftp = Net::FTP->new("$remotehost", Debug => 0) or
die "cannot connect:";
print "Logging in...\n";
$ftp->login("$user","$pass")
or die "cannot login: ",$ftp->message;
print "Changing to $remotedir...\n";
$ftp->cwd($remotedir)
or die "cannot cwd to $remotedir: ",$ftp->message ;
print "Beginning Transfer...\n";
foreach $file (@files)
{
print "transfer $file..\n";
$ufilename = $ftp->put_unique($file);
print $ftp->unique_name();
print $ufilename,"\n";
}
$ftp->quit();
print "Done.\n";
######################################
and Here is the result on the screen :
[root@myserver1]:/tmp/test # test_ftp.perl TEST
Connecting...
Logging in...
Changing to /tmp...
Beginning Transfer...
transfer TEST..
Done.
[root@siihr7]:/tmp/test #