Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: Re: Re: How many bugs can *you* find

by Beatnik (Parson)
on May 01, 2001 at 23:53 UTC ( #77097=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: How many bugs can *you* find
in thread How many bugs can *you* find

To nitpick further doing s///'ing \n and \r separatly is faster using a char class.

Greetz
Beatnik
... Quidquid perl dictum sit, altum viditur.


Comment on Re: Re: Re: Re: How many bugs can *you* find
Select or Download Code
Re: Re: Re: Re: Re: How many bugs can *you* find
by satchboost (Scribe) on May 01, 2001 at 23:58 UTC
    That may be true in general, but the idea is to take the CRLF sequence in Unix (\n) and the CRLF sequence in Windows (\n\r) and replace either of them with <p>. To do that, one regex is simpler than two.
      a character case won't solve that :)

      Greetz
      Beatnik
      ... Quidquid perl dictum sit, altum viditur.
        You're right. That's why that was a bug. :) A better solution would have been s/\n\r?/<p>/g;, not that character class.
      FYI when I am on Unix looking at files from DOS, the end of line sequence is \r\n, not \n\r.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://77097]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (12)
As of 2014-07-10 09:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (203 votes), past polls