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

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Brilliant!!! The & prototype was the secret sauce! Thank you so much for your help.

I'm embarrassed to see that it was on page 123 of High Order Perl and I missed it. An example with a foreach would have helped -- but MJD did such an awesome job with a lot of complicated topics in that book that there's no way I'm going to complain! I should have read the chapter more carefully.

There's a web site called which provides a database of idioms implemented in different languages for easy comparison. The reason I asked about this is that I made a contribution to the idiom for generator functions but after additional testing realized it didn't work in a foreeach loop. I'll use your suggestion to update it.

Here's a link to the programming idioms page I'll be modifying:

Idiom #319 generator functions

In reply to Re^2: How can I create an iterator that works inside foreach() (updated) by PUCKERING
in thread How can I create an iterator that works inside foreach() by PUCKERING

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2023-03-31 12:26 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (75 votes). Check out past polls.