At 13:00 -0500 04/02/2011, Uri Guttman wrote:

  HP> Yet they seem to be carefully avoided.  That is what I nearly always
  HP> use.  Is there some reason to avoid `//' as delimiters?

[ I really object to the backtick being used instead of an opening quote mark. The only possiblt excuse for it is if plain text needs eventually to be converted quickly to text containing curly quotes. ]


no. you should // in most cases. you should change to alternate
delimiters (for all delimited string like things) when the default
delimiter is in the string itself...

I think it's misleading, and certainly inaccurate, to say you _should_ use the solidus (the correct name for the character you colloquially call a slash) in preference to any other delimiter in matches and substitutions. I personally almost always use the tilde as in m~x~, s~x~y, qq~string~, not only because it rarely occurs in the patterns or the strings but also because I find it less likely to be confusing. Others use different delimiters with just as much right or reason. As you yourself say the solidus can become very confusing as a delimiter because not only the solidus itself within a pattern needs to be escaped with a reverse solidus but so may other characters, with the risk of an unreadable string of leaning toothpicks.

In brief people are free to use what they like. TMTOWTDI.

JD


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to