You don't tell us the full error message. Perl also told you, what requires the explicit package name.
Your code is riddled with logical and syntactical errors:
The syntax for accessing or setting a hash entry uses squiggly brackets, not parentheses. Use $args{user} instead of $args(user) which makes no sense.
Some of your lines do not end with a semicolon even though the statement seems to be complete at the line.
You set and declare $user and $password later than you use them. This is likely what Perl complains about. You need to move these lines upwards in your program.
You call Net::SFTP->($host, %args);, but I don't know what it should do. Maybe you can tell us what you expect it to do and where in the Net::SFTP documentation you found that.
In reply to Re: SFTP Compile Errors
by Corion
in thread SFTP Compile Errors
by btobin0
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |