$ftphost='192.168.100.2'; $user='munu'; $pass='munu'; $file='a.b'; $count =10; #### #!/usr/bin/perl use CGI; use Net::FTP; ######################### my $q = CGI->new(); print $q->header("text/html"); print"\n"; ####################### #Code to get input from the web $buffer; my @pairs; my $pair; my %FORM; $buffer = $ENV{'QUERY_STRING'}; @pairs =split(/&/,$buffer); foreach $pair (@pairs) { (my $name,my $value)=split(/=/,$pair); $value =~ tr/+/ /; $value =~ s/%(..)/pack("C", hex($1))/eg; $FORM{$name} = $value; } ############################ $ftphost=$FORM{serverip};#ftp host $user=$FORM{user};#username $pass=$FORM{pass};#password $file=$FORM{file};#filename $count = $FORM{count};#no. of times to get the file or no. of ftp connections print $ftphost, $user, $pass, $file, $count; $!=1; $c=1; while ($count >= 1) { $ftp = Net::FTP->new($ftphost, Debug => 1,Hash=>1); ############################################## #or die "incorrect username or passwd"; is not printing anything. Thats why i have written in the following #manner. if(! $ftp->login($user,$pass)) { print "incorrect user name or password"; die; } ################################## #put is working fine but get is not working $ftp->put($file); ################################### print $ftp->message; ##in the messege it is telling "ABORTED SUCCESSFULLY" print $c++," success"; $count--; }