>>>>> "Ryan" == Ryan  <[EMAIL PROTECTED]> writes:

Ryan>  my %data = (
Ryan>   k1 => 'a',
Ryan>   k2 => ['b', 'c'],
Ryan>   k3 => ['d', 'e', 'f']
Ryan>   k4 => 'a'
Ryan> );

Ryan> I want to get all the possible combinations:

my @result = map [split /-/], glob "{a}-{b,c}-{d,e,f}-{a}";

:-)

But seriously, why does this come up often?  What's your particular
application area?  Is it to solve a puzzle?  Is it homework?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to