Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Getting permutations of length n of an array of length greater than n?

by tybalt89 (Prior)
on Jan 18, 2022 at 22:42 UTC ( #11140592=note: print w/replies, xml ) Need Help??


in reply to Getting permutations of length n of an array of length greater than n?

Alternate way

#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11140589 use warnings; use ntheory qw( forcomb forperm ); forcomb { my @sel = @_; forperm { print @sel[@_], ' ' } scalar @sel; } 8, 5; print "\n";
  • Comment on Re: Getting permutations of length n of an array of length greater than n?
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11140592]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2022-05-28 14:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (99 votes). Check out past polls.

    Notices?