in reply to Re: Getting multiline input from a server
in thread Getting multiline input from a server
Now, this code works when connected to an HTTP port. This is what had me confused. I'm discovering the the bad behavior only occurs when connected to an FTP port where it will hang. Now is this because the connection is terminated by the server in an HTTP connection? I'm guessing this is what must be happening but I don't know for sure. When connected to an FTP, it waits and waits for more data to fill the array because the connection is still open, I'm also assuming.my (@from_server,$from_user); while (my $from_user = <>) { # a simple "GET" command print $socket $from_user; my @from_server = <$socket>; print @from_server; } close $socket;
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop";
$nysus = $PM . $MCF;
Click here if you love Perl Monks
|
|---|