Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I think that it would be good if this tutorial not only explained what closures are, but also the common "variable will not stay shared" gotcha. This tends to be hit in mod_perl when people use Apache::Registry and wrap what was a working program inside of a function.

If you are trying to explain what the problem is and why it is impossible to resolve properly, the example at Re (tilly) 9: Why are closures cool? may help...


In reply to Re: Lexical scoping like a fox by Anonymous Monk
in thread Lexical scoping like a fox by broquaint

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?
    LanX where is the camera?
    Tux => $HOME
    [Eily]: you wrote boos instead of boss, and jedikaiti read that as boobs :)
    [LanX]: Win claims only 8 MB left on C: how do I find out where the problem happens?
    [Eily]: by Tux. And going home sounds like a good idea
    [Eily]: LanX pretty much everywhere except in 8MB ?
    [Eily]: s/by/bye/ someone hacked my keyboard I'm sure
    [LanX]: good point! :)
    [Eily]: LanX I don't understand the question though, you want to know what is taking so much space?
    [Tanktalus]: Probably the swapfile :)

    How do I use this? | Other CB clients
    Other Users?
    Others cooling their heels in the Monastery: (13)
    As of 2017-09-20 16:42 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      During the recent solar eclipse, I:









      Results (237 votes). Check out past polls.

      Notices?