Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

How's this?

#! perl -slw use strict; my @array = ( [ 'a', 'b', 'c' ], [ 1, 2 ], ['x', 'y', 'z' ], [ 7, 8, 9 ] ); sub p { my( $stem, @a ) = @_; return @{ shift @a } if @a == 1; map { my $pre = $_; map( { $pre . $_ } p( $stem . $_, @a ) ), $pre; } @{ shift @a }; } print for p( '', @array ); __END__ P:\test>287900-2 a1x7 a1x8 a1x9 a1x a1y7 a1y8 a1y9 a1y a1z7 a1z8 a1z9 a1z a1 a2x7 a2x8 a2x9 a2x a2y7 a2y8 a2y9 a2y a2z7 a2z8 a2z9 a2z a2 a b1x7 b1x8 b1x9 b1x b1y7 b1y8 b1y9 b1y b1z7 b1z8 b1z9 b1z b1 b2x7 b2x8 b2x9 b2x b2y7 b2y8 b2y9 b2y b2z7 b2z8 b2z9 b2z b2 b c1x7 c1x8 c1x9 c1x c1y7 c1y8 c1y9 c1y c1z7 c1z8 c1z9 c1z c1 c2x7 c2x8 c2x9 c2x c2y7 c2y8 c2y9 c2y c2z7 c2z8 c2z9 c2z c2 c

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
If I understand your problem, I can solve it! Of course, the same can be said for you.


In reply to Re: Variant permutation by BrowserUk
in thread Variant permutation by gmax

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others browsing the Monastery: (4)
    As of 2014-12-20 21:55 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (99 votes), past polls