Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Using select() on only one socket

by GrandFather (Saint)
on Sep 04, 2005 at 10:07 UTC ( [id://489036]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    print SOCKET "Hi there, client!\015\012";  # right
    print SOCKET "Hi there, client!\r\n";      # wrong
    
  2. or download this
    use Socket qw(:DEFAULT :crlf);
    print SOCKET "Hi there, client!$CRLF"      # right
    
  3. or download this
    use Socket qw(:DEFAULT :crlf);
    local ($/) = LF;     # not needed if $/ is already \012
    ...
    while (<SOCKET>) {
        s/$CR?$LF/\n/;   # replace LF or CRLF with logical newline
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://489036]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-25 19:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found