home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
perl_ste.zip
/
auto
/
Net
/
FTP
/
pasv_wait.al
< prev
next >
Wrap
Text File
|
1997-11-28
|
579b
|
30 lines
# NOTE: Derived from ./blib/lib/Net/FTP.pm. Changes made here will be lost.
package Net::FTP;
sub pasv_wait
{
@_ == 2 or croak 'usage: $ftp->pasv_wait(NON_PASV_FTP)';
my($ftp, $non_pasv) = @_;
my($file,$rin,$rout);
vec($rin,fileno($ftp),1) = 1;
select($rout=$rin, undef, undef, undef);
$ftp->response();
$non_pasv->response();
return undef
unless $ftp->ok() && $non_pasv->ok();
return $1
if $ftp->message =~ /unique file name:\s*(\S*)\s*\)/;
return $1
if $non_pasv->message =~ /unique file name:\s*(\S*)\s*\)/;
return 1;
}
1;