sub setmode ($\@) { our( $val, @array ); local( $val,*array ) = @_; splice (@array, 1, 0, $val); }