I'm sure I will be downvoted for disagreeing but...
Using a newline (or CR LF pair) is not that unusual, and is actually rather common. SMTP and POP are two that come to mind and use nothing but CR LF for line endings. Also HTTP, FTP, and IMAP all use CR LF endings extensively (although they do have sections of data reading that is better left to sysread()).
Doing a
<SOCK> at the wrong time is a symptom of not knowing what you are dealing with while using sockets. It is more a problem of not being defensive than it is doing things wrong. Under most protocols (SOCK_DGRAM and recv() excluded) the programmer should make extensive use of alarm() to make sure he is timing out at apropriate waits. Even when doing a read() or sysread() the server or client could block if they have not read enough data to fulfill the protocol.
Using a newline (or CR LF) is perfectly acceptible, if you know the protocol uses it, or have made up your own that uses it.
However, when people don't know what they are doing, or aren't defensive, or don't know the protocol,
tye is perfectly correct and doing a getline() should be avoided.
my @a=qw(random brilliant braindead); print $a[rand(@a)];