From: "Ing. Branislav Gerzo" <[EMAIL PROTECTED]>
> Tim Wolak [TW], on Thursday, March 03, 2005 at 10:19 (-0600)
> contributed this to our collective wisdom:
> TW> my $host = "0.0.0.0";
> TW> my $sftp = Net::SFTP::->new($host);
> $sftp->login("$user","$pass");
> $sftp->put("test.txt");
> 
> you dont need ":
> $sftp->login($user,$pass);
> $sftp->put(test.txt);

You don't need the quotes around the variables, you do need it around 
the string literal :-)


 $sftp->login($user,$pass);
 $sftp->put("test.txt");
 
> Also it could be good checking if operation was successful, so:
> $sftp->login("$user","$pass") || die "Can't connect...\n";

Agreed completely.

Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
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