in reply to Newline Character and Socket Comms
I presume you mean you changed the server code to include:
Taa Update As tilly pointed out, in CB, it is a good idea to get out of the habit of using C style for loops use for my (1..10) {stuff}. Tiss neater and nice and clear. Not directly relevent but very good advice all the same. Cheers Tilly
--
Zigster
Within the while loop instead of thefor(my $i=0; $i <= 10; $i++) { print $new_sock "$i\n"; }
I have tried this and all seems to work fine. Can you confirm a few more details regarding what you are doing and on what platform.my $msg = <$new_sock>; print "client said '$msg'\n";
Taa Update As tilly pointed out, in CB, it is a good idea to get out of the habit of using C style for loops use for my (1..10) {stuff}. Tiss neater and nice and clear. Not directly relevent but very good advice all the same. Cheers Tilly
--
Zigster
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: (Zigster) Newline Character and Socket Comms
by Ducati (Beadle) on May 04, 2001 at 21:49 UTC |
In Section
Seekers of Perl Wisdom