Código
#!usr/bin/perl #FTP Manager #(C) Doddy Hackman 2010 use Net::FTP; &head; if (my $socket = Net::FTP->new($ftp)) { if ($socket->login($user,$pass)) { menu: if ($cmd=~/help/) { help : show information cd : change directory <dir> dir : list a directory mdkdir : create a directory <dir> pwd : directory size : size of the a file <file> put : upload a file <file> get : download a file <file> cdup : change dir <dir> ); } if ($cmd=~/dir/ig) { if (my @files = $socket->dir()) { for(@files) { } } else { } } if ($cmd=~/pwd/ig) { } if ($cmd=~/cd (.*)/ig) { if ($socket->cwd($1)) { } else { } } if ($cmd=~/cdup/ig) { if (my $dir = $socket->cdup()) { } else { } } if ($cmd=~/del (.*)/ig) { if ($socket->delete($1)) { } else { } } if ($socket->rename($1,$2)) { } else { } } if ($socket->mkdir($1)) { } else { } } if ($socket->rmdir($1)) { } else { } } copyright(); } if ($cmd=~/get (.*) (.*)/ig) { if ($socket->get($1,$2)) { } else { } } if ($cmd=~/put (.*) (.*)/ig) { if ($socket->put($1,$2)) { } else { } } goto menu; } else { } } else { } sub head { } sub copyright { } # ¿ The End ?