>>>>> "HP" == Harry Putnam <[email protected]> writes:

  HP> Jim Gibson <[email protected]> writes:
  >> On 2/4/11 Fri  Feb 4, 2011  8:02 AM, "Harry Putnam" <[email protected]>
  >> scribbled:

  >> You can use other characters to make it more readable. However, all
  >> of the normal delimiters such as {} and [] have other meanings
  >> within the regular expression. Some overlap of meaning is
  >> unavoidable, and context-awareness is required on the part of the
  >> reader.

  HP> I notice that in the OPs code and in your examples, the forward slash
  HP> is not used at all.... When you say above that "all the normal
  HP> delimiters [...]" .. but forward slashes `//' do not have special
  HP> meaning inside and would seem then to be ideal char for delimiters.

they are called slashes. there is no forward slash. wipe that term from
your memory. there is a backwards slash. slash has always been slash and
should stay that way regardless of its abuse by redmondware.

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

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. or in some cases with regexes like
with /x (extended mode) it is easier to deal with other delims. and the
best choice for alternate delims are paired ones, in particular {}.

uri

-- 
Uri Guttman  ------  [email protected]  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to