On Oct 17, 3:04 am, [EMAIL PROTECTED] (Sharan Basappa) wrote:
.
.
>
> #!/usr/bin/perl
> use warnings;
> use Algorithm::Permute;
> my @array = (1..4);
> Algorithm::Permute::permute { print "@array\n" } @array;
use warnings;
use strict;
use Algorithm::Permute;
my @array = (1..9);
my $p = new Algorithm::Permute([EMAIL PROTECTED]);
# print out the first 20 permutations of @array,
# assigning each permutation to @new, and
# printing it out:
for(1..20) {
my @new = $p->next;
print "@new\n";
}
Cheers,
Rob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/