In article <[EMAIL PROTECTED]>, Silvio Santana wrote:
>I send data from the client to server with the lines:
>
>$mensagem = "10-bytes-of-data";
>print $servidor $mensagem;
>
>But I am realizing that the data aren't being sent,
>unless they're ending with "\n".
< SNIP >
>
>The question is: how can I send the data immediately?
So, assuming that I've understood you, and ending your data with
"\n" causes immediate sending, is there any reason why you can't
take advantage of the string concatenation operator ('.')?
print $servidor $mensagem . "\n" # Concatenate a newline
# to the end of $mesagem
Or simply add the "\n" to $mesagem at the time you define it.
# More concatenation
$mensagem = "10-bytes-of-data" . "\n";
# You could also embed the newline
$mensagem = "10-bytes-of-data\n";
HTH,
John
--
John Fox <[EMAIL PROTECTED]>
System Administrator, InfoStructure, Ashland OR USA
---------------------------------------------------------
"What is loved endures. And Babylon 5 ... Babylon 5 endures."
--Delenn, "Rising Stars", Babylon 5
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]