while (defined($buf = <$sock>){ print $buf; }