So you are giving me reasons why you think it shouldn't generally be done. That's fine. I agree.

But ... I'm still looking for an answer to the question.

Besides, 'way to magical'...having a function that acts like an array... yeah...right...*NOT*....

People have functions that grab onto operators and such all the time...those are no less 'magical'. It's call 'syntactic sugar'.... might NOT be something I'd use everywhere, since in an OO setup, you don't usually want to give the 'client' direct access to your array, but in some cases, the efficiency is worth the trade off -- especially if you are your own client and know you'll be "well behaved"...:-)...

As for :

p.s. Hey, what's with P.M. not recognizing ">" in code and xlating it to ">"? Doesn't HTML convert text entities everywhere?

Cause it saves you a lot of work.

It also violates the HTML standard.  I.e. it breaks tools that use the standard.  If PM used a keyword that wasn't part of the HTML standard, like 'literal', then there wouldn't be a prob, but redefining standard HTML...UG...  better would be a PM specific tag, like pm_code... then its likely to never conflict with any future reserved words...

 

Try https://addons.mozilla.org/en-US/firefox/addon/write-area/.

It brings features to pm, that pm 'should' have builtin, (most sites that have html composition have builtin html editors....but not slashdot, and not perlmonks...)...  perlmonks is more like a social site -- a community site, than a new site -- so IMO, I think it should move toward the 'friendly side' rather than expecting people to write code to post a message...But that' just my feeling...

At least slashdot is smart enough to recognize plaintext and leave it as such .. whereas here...all formatting is stripped,  and a proprietary formatting language is used...ug!

About the above addon...to use it...when you get a write box, just right-click and say 'edit in a write area'  brings up a little thml editor right in the window.  (I sorta prefer it when it comes up outside the window as it does on most sites...not sure why it is different here...(same on sysinternals site)...edits inline)...

 

 

 


In reply to Re^2: How to determine if 'ref' is wanted? (ala 'wantarray') by perl-diddler
in thread How to determine if 'ref' is wanted? (ala 'wantarray') by perl-diddler

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, details, 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, summary, 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.