Help for this page

Select Code to Download


  1. or download this
    time perl -MAlgorithm::Combinatorics=:all -wle'
    my $i=variations_with_repetition(["a".."z"],$ARGV[0]); 
    my @x; push @x, map {s/ //} qq[@$_] while $_=$i->next; 
    print scalar @x' 4
    
  2. or download this
    time perl -MAlgorithm::Combinatorics=:all -wle'
    my $i=variations_with_repetition(["a".."z"],$ARGV[0]); 
    my @x; push @x, map {$_} qq[@$_] while $_=$i->next; 
    print scalar @x' 4
    
  3. or download this
    time perl -MAlgorithm::Combinatorics=:all -wle'
    my $i=variations_with_repetition(["a".."z"],$ARGV[0]); 
    my @x; push @x, pack "A*", qq[@$_] while $_=$i->next; 
    print scalar @x' 4
    
  4. or download this
    time perl -MAlgorithm::Combinatorics=:all -wle'
    my $i=variations_with_repetition(["a".."z"],$ARGV[0]); 
    my @x; push @x, join "", @$_ while $_=$i->next; 
    print scalar @x' 4
    
  5. or download this
    time perl -MAlgorithm::Combinatorics=:all -le'
    my $i=variations_with_repetition(["a".."z"],$ARGV[0]); 
    my @x; qq[$"=undef]; push @x, qq[@$_] while $_=$i->next; 
    print scalar @x' 4