Help for this page

Select Code to Download


  1. or download this
    use IO::Socket qw(crlf); # now you can use CRLF constant
    $|++;                    # non-buffered
    
  2. or download this
    # in server:
    print $new_sock $_, CRLF;
    
    # in client:
    print $sock "Hello there", CRLF;
    
  3. or download this
    # server
    use strict;
    ...
    print $sock->getline();
    
    close($sock);