Skip to content

Instantly share code, notes, and snippets.

@fakessh
Created November 7, 2012 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fakessh/4032362 to your computer and use it in GitHub Desktop.
Save fakessh/4032362 to your computer and use it in GitHub Desktop.
generate permutation with Algorithm::Permute
#!/usr/bin/perl
use Algorithm::Permute;
my $p = new Algorithm::Permute(['a'..'d']);
while (@res = $p->next) {
print join(", ", @res), "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment