а если так:
#!/usr/bin/perl
use IO::Socket;
$socket = IO::Socket::INET->new(PeerAddr => "www.engcomp.ufrn.br",
PeerPort => \'21\',
Proto => \'tcp\');
send($socket,"USER ftp\\r\\n",0);
send($socket,"PASS ftp\\r\\n\\r\\n",0);
recv($socket,$otvet,1024,0);
print $otvet,"\\n";
recv($socket,$otvet,1024,0);
print $otvet,"\\n";
recv($socket,$otvet,1024,0);
print $otvet,"\\n";