Indomitus has asked for the wisdom of the Perl Monks concerning the following question:
Server:print "# "; $msg = <STDIN>; while ($msg !~ /^end$/) { print $sock "$msg"; my $in_msg = <$sock>; print "> ",$in_msg; print "# "; $msg = <STDIN>; }
Thanks a lot in advance.$session = $sock->accept(); while (<$session>) { $recv_msg = $_; print $recv_msg; $send_msg = scalar reverse $recv_msg; print $session $send_msg; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sending & Receiving on a socket
by blakem (Monsignor) on Sep 13, 2001 at 09:52 UTC | |
|
Re: Sending & Receiving on a socket
by Ryszard (Priest) on Sep 13, 2001 at 09:51 UTC | |
|
Re: Sending & Receiving on a socket
by Beatnik (Parson) on Sep 13, 2001 at 15:14 UTC | |
|
(tye)Re: Sending & Receiving on a socket
by tye (Sage) on Sep 13, 2001 at 19:42 UTC | |
by Rhandom (Curate) on Sep 13, 2001 at 20:48 UTC | |
by tye (Sage) on Sep 13, 2001 at 22:08 UTC | |
|
Re: Sending & Receiving on a socket
by jepri (Parson) on Sep 13, 2001 at 20:25 UTC |