http://www.perlmonks.org?node_id=1028540


in reply to Re: A "strange" behaviour, at least to me :)
in thread A "strange" behaviour, at least to me :)

@values = sort {},arraynosort(Values=>\@orig_values);
passes a hash ref to sort. You meant
@values = sort { $a cmp $b } arraynosort(Values=>\@orig_values);

By the way, the least invasive solution is:

@values = sort +arraynosort(Values=>\@orig_values);