> When I print the @buffer outside the while loop , I am not
> getting the output.
>
> Note : The commented line i.e. #print "Server: $_"; works and
> prints all the lines read from the socket.
>
> Please somebody tell me what error have I been making.
>
> Regards
> Rajeev
> ****************************************************
> sub send_msg {
> $sock = shift @_;
> $msg = shift @_;
>
> my @buffer;
>
> select($sock);
> $| = 1;
> select(STDOUT);
>
> print $sock $msg, "\n";
> while (<$sock>) {
> if( $_ =~ /^DONE$/) {
> print "Server: $_";
> return;
> }
> #print "Server: $_";
> push @buffer, $_;
> }
> print @buffer;
> }
try: $buffer .= $_;
print $buffer;
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]