my @out = sort(do_nothing(@in)); #### sub do_nothing { wantarray ? @_ : -1 } #### sub do_nothing { wantarray ? @_ : ($b cmp $a) } #### my @out = sort &do_nothing(@in);