Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: finding all combinations

by brx (Pilgrim)
on Jan 15, 2008 at 14:39 UTC ( [id://662472]=note: print w/replies, xml ) Need Help??


in reply to finding all combinations

Using idea of ikegami ( N-Queens problem with a regex (again) )
With regex :
my @array1=(1,2,3); my @array2=(7,8); my @array3=(1,5,23,3); " @array1 , @array2 , @array3 " =~ / (\S+) .*?,.*? (\S+) .*?,.*? (\S+) (?{ push @res,"$1-$2-$3"; + })(?!)/; print join ', ',@res;

Log In?
Username:
Password:

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

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

    No recent polls found