print "bob\n"; my $sel = IO::Select->new(); $sel->add($sock); while (1){ print "!"; if ($b = $sel->can_read(0.5)){ $line = <$socket>; print $line; } else { print "."; } } #end of while 1