while( defined( ( ($x,$y)= recv_data() )[0] ) ) #### my( $x, $y )= recv_data(); while( defined $x ) { ... ( $x, $y )= recv_data(); }