in reply to Regex delimiter
For one thing, when you use non-standard delimiters, you need to preface them with "m". In other words, you can use /regex/ or m/regex/, or m#regex#, but you cannot use #regex# without the leading m.
Also, in perlop, you can read the following explanation as to what characters are permissible:
If "/" is the delimiter then the initial m is optional. With the m you can use any pair of non-alphanumeric, non-whitespace characters as delimiters. This is particularly useful for matching path names that contain "/", to avoid LTS (leaning toothpick syndrome). If "?" is the delimiter, then the match-only-once rule of ?PATTERN? applies. If "'" is the delimiter, no interpolation is performed on the PATTERN.
So to reiterate: In your example you're using 'a' as the delimiter. This is not allowed according to perlop. The documentation explains that the delimiter must be non-alphanumeric, and non-whitespace.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex delimiter
by jwkrahn (Abbot) on Jun 26, 2007 at 20:17 UTC | |
by davido (Cardinal) on Jun 27, 2007 at 04:25 UTC |