getlinefromsocket() { my $socket = shift; my $buffer; my $char; while ($socket->recv($char,1)) { $buffer+=$char; } }