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