use warnings; use strict; use Data::Dumper; use IO::Select; use IO::Socket; my $sock = IO::Socket::INET->new( PeerAddr=>'127.0.0.1', PeerPort=>1235 ) or die "sock: $@"; my $sel = IO::Select->new($sock); while ( my @ready = $sel->can_read(1) ) { for my $fh (@ready) { print "Attempting to read...\n"; # all of these hang! #print Dumper($fh->getlines); #print Dumper($fh->getline); print Dumper(scalar <$fh>); } }