Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Remove the ^M Character from a Document

by Abigail-II (Bishop)
on Jun 03, 2002 at 18:21 UTC ( [id://171296]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Remove the ^M Character from a Document
in thread Remove the ^M Character from a Document

The leaning toothpick syndrome arises if one has to escape forward slashes. No forward slashes need to be escaped.

Pray tell us, why are comma's or hashes easier to read than forward slashes, especially considering that forward slashes are most commenly used as delimiters, while commas and hashes usually play another role?

Abigail

  • Comment on Re: Remove the ^M Character from a Document

Replies are listed 'Best First'.
Re: Remove the ^M Character from a Document
by hacker (Priest) on Jun 04, 2002 at 12:55 UTC
    As you know, "LTS" or "Leaning Toothpick Syndrome" does not always have to involve the use of the '\' character to escape the presence of another '/' character. Seeing '/\/\/\' is also an example of LTS.

    Using another delimiter makes the code more readable, and is recommended by many top perl programmers (and is also covered in perlfaq, perlretut and in japhy's book).

    They are easier to read, because I don't have to visually and mentally separate what the content between the substitution means before I can decipher what the substituion does.

    Are we not here to teach others, and share that knowledge we've learned with others who may not yet have the experience?

    TMTOWTDI

      Are we not here to teach others, and share that knowledge we've learned with others who may not yet have the experience?

      Which is exactly why I objected to the reasoning that lead to suggesting another delimiter. It's a good thing to be consistent, and use standards, be them mandatory, de facto, or evolved. It's also good to deviate from the standard if there are good reasons for it. It's not good to pretend that subjective reasons are authoritive. I don't care if someone prefers using hashes or commas over forward slashes when delimiting regexes that don't use forward slashes themselves. But I do object by suggesting the use of a de facto standard obfuscates.

      Abigail

Re: Re: Remove the ^M Character from a Document
by Sifmole (Chaplain) on Jun 03, 2002 at 18:37 UTC
    Maybe the poster has a pathlogical issue with slashes, maybe commas are like prozac to them. Perhaps they were viciously harrangued by a maruading horde of forward slashes on their way to kindergarten one day.

    Seriously though, I didn't say it was easier to read but that perhaps that was what the poster was getting at.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-23 22:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found