sub middle ($$) { my ( $a, $b ) = ( shift, shift ); return ($a + $b) / 2 }