Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

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

I missed the 'triple nested labeled goto spaghetti loop' and wound up voting for the simply uninteresting 'labeled block'. My reasoning behind wanting the triple nested goto block is simple enough: if I'm going to be using the construct for the short eternity of my life, I'd better enjoy using it. Just reming yourself that you are going to drive yourself crazy using one looping mechanism, so you'd might as well choose the crazy one.

# why code this (equiv: print $_, "\n" for 1 .. 10;) for my $i (1 .. 10) { print $i, "\n"; } # when you can code this? -- untested, no perl # on current box; probably doesn't do what # the above snippet does, but it's suppose to my $i = 0; ONE: { $i -= (8 - 2 * 2 - 2 * 4); # $i += 4 goto FOUR; TWO: { print $i; THREE: { print "\n"; 10 == $i ? exit() : goto ONE; FOUR: { $i += 3 * -1; # $i -= 3; goto TWO; } } } }

In reply to Re: If I was forced to use only one kind of loop for the rest of my days it would be a by saskaqueer
in thread If I was forced to use only one kind of loop for the rest of my days it would be a by collin

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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 taking refuge in the Monastery: (9)
    As of 2019-03-25 15:43 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      How do you Carpe diem?





      Results (119 votes). Check out past polls.

      Notices?