Skip to content

Instantly share code, notes, and snippets.

@likhatskiy
Created November 18, 2009 07:58
Show Gist options
  • Save likhatskiy/237637 to your computer and use it in GitHub Desktop.
Save likhatskiy/237637 to your computer and use it in GitHub Desktop.
list shuffle
sub ashuffle {
my @a = @_;
[map {splice @a, int rand scalar @a, 1} 1..scalar @a];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment