foreach $handle1 (@read_from) { $buf = <$new_sock>; if($buf){ print $buf; } }