I was about to comment that this doesn't work, that it should crash perl. But it seems that they have changed sort from under my eyes. Instead of saying sort will seg fault when given inconsistant results, it now just says sort's behavior is "not well-defined". Still sounds fishy, but testing the snippet out seems to suggest that it still works.
Here is a slightly more sparse version:
my @list = sort {-1+int rand 3} (0..99);