Código:
Name "main::perl" used only once: possible typo at roto2.pl line 4.
Use of uninitialized value $ARGV[0] in string at roto2.pl line 4.
Use of uninitialized value $ARGV[0] in concatenation (.) or string at roto2.pl line 4
Use of uninitialized value $perl in concatenation (.) or string at roto2.pl line 4.
Cannot connect to Host
y el codigo es:
Código:
#!/usr/bin/perl -w
use Net::FTP;
$ftp=Net::FTP->new("$ARGV[0]",Debug=>0) || die "Cannot connect to Host $ARGV[0]\n Usage: $perl script_name.pl target_ip\n";
$ftp -> login("anonymous","anonymous") || die "Could not Login...Retry";
while(1)
{
#this loop runs infinitely
$ftp -> cwd();
}
$ftp->quit;