Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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

by choroba (Cardinal)
on Jan 18, 2022 at 22:08 UTC ( [id://11140590]=note: print w/replies, xml ) Need Help??


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

Instead of Algorithm::Permute, try Math::Combinatorics or Algorithm::Combinatorics.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-03-28 16:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found