in reply to Re^2: Search and Replace Within Subscopes
in thread Search and Replace Within Subscopes

You can use any pair of non-alphanumeric, non-whitespace charaters as delimiters of a regex pattern. So these regexes are equivalent:

s/a/b/; s"a"b"; s^a^b^; s{a}{b}; s(a)[b];
Only ' is an exception, this character prevents variable interpolation if used as delimiter

Advantage is that you can use / inside them without escaping the character. Also it could be argued that {} [] or () as delimiters just look better, especially for complex patterns. Edit: Deleted one erraneous example found by ikegami

Replies are listed 'Best First'.
Re^4: Search and Replace Within Subscopes
by ikegami (Patriarch) on Jul 04, 2008 at 20:08 UTC
    >perl -ce"/a/b/" Bareword found where operator expected at -e line 1, near "/a/b" (Missing operator before b?) syntax error at -e line 1, near "/a/b" -e had compilation errors.

    /a/b/
    is the same as
    m/a/ b /