in reply to finding all combinations
Using idea of ikegami ( N-Queens problem with a regex (again) )
With regex :
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;
|
---|
In Section
Seekers of Perl Wisdom