... join '|' => sort { length $a <=> length $b } @$xxxxxx_criteria; #### ... "whoever@example.com" ... # Oops!