Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Combinations with variable length

by LanX (Cardinal)
on May 10, 2021 at 17:43 UTC ( #11132355=note: print w/replies, xml ) Need Help??


in reply to Combinations with variable length

DB<19> $dyn = 3 DB<20> $gen = join " ", ("{1,2}") x $dyn DB<21> say for <"$gen"> 1 1 1 1 1 2 1 2 1 1 2 2 2 1 1 2 1 2 2 2 1 2 2 2

HTH! :)

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2021-08-01 15:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My primary motivation for participating at PerlMonks is: (Choices in context)








    Results (10 votes). Check out past polls.

    Notices?