Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I was going to answer something like that, but forgot all about it. In the meantime, I've read (once again) some parts of, and found these interesting regexes:

$toencode =~ s{&}{&amp;}gso; $toencode =~ s{<}{&lt;}gso; $toencode =~ s{>}{&gt;}gso; $toencode =~ s{"}{&quot;}gso; ... $toencode =~ s{'}{&#39;}gso; $toencode =~ s{\x8b}{&#139;}gso; $toencode =~ s{\x9b}{&#155;}gso; ... $toencode =~ s{\012}{&#10;}gso; $toencode =~ s{\015}{&#13;}gso;

That's at least 9 uses of /o with no variable interpolation in the pattern.

But CGI also doesn't use strict, has no spaces after commas, uses C-style for-loops where lists where more efficient and better readable, assumes that the IP address "0" equals "", has ugly #-laden comments, etc... So is the use of /o really more efficient when no variable interpolation is used, or is this yet another strange thing in (Excuse me for being so negative about, but having read it, I prefer my own set of functions even more.)


In reply to Re: Re: Re: •Re: Find illegal ASCII characters by Juerd
in thread Find illegal ASCII characters by fmogavero

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?

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

    How do I use this? | Other CB clients
    Other Users?
    Others chanting in the Monastery: (7)
    As of 2020-11-23 20:26 GMT
    Find Nodes?
      Voting Booth?

      No recent polls found