HI all....i am very2 new and dummies in Perl.....i got a problem about my code....I 
have develop some programm using Net::SFTP..to ftp to a remote server.....Here is my 
code...

====================================
#!/usr/bin/perl


use Net::SFTP;
#use strict;
#use warnings;



$host = $ARGV[0];

$anonyuser = $ARGV[1];



if($ARGV[1] eq "-a") {



                 $username = "anonymous";

                 $password = "-anonymous@";



} else {        

        

        print("\nSpecial commands:\n");

        print("./SFC <host\/ip> -a = Login as Anonymous\n");

        print("bye = exit\n");



        print("\nHost\/IP: ");

        $host = <STDIN>;

        chomp ($host);



        print("\nUsername: ");

        $username = <STDIN>;

        chomp ($username);



        print("\nPassword: ");

        $password = <STDIN>;

        chomp ($password);

    }





print("Connecting to $host...\n");

$ssh = Net::SFTP -> new($host) or die "Couldn't connect to $host\n";
 

print("Connected!\n");

print("\nSFC>");



$ssh->login($username, $password)

or die "Could not log in .\n";

    

rep:

            

$command = <STDIN>;

chomp ($command);

unless ("$command" eq "bye") 
{                                        

                  @listing = $ssh->$command;

                  for($i=0;$i<@listing;$i++) { print "$listing[$i]\n"; 
}      

                  print("SFC>");                     

                  #goto rep;                              
}
=======================================
The problem is when i am running it, i receive this message

"Permission denied at /usr/lib/perl5/site_perl/5.8.0/Net/SFTP.pm line 39"

i don't know whats wonr...Can anybody help me?....


This e-mail and any attachments may contain confidential and
privileged information. If you are not the intended recipient,
please notify the sender immediately by return e-mail, delete this
e-mail and destroy any copies. Any dissemination or use of this
information by a person other than the intended recipient is
unauthorized and may be illegal.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to