in reply to Matching nested begin/ends

That doesn't work too well on my Win2000 machine. You need to change the delimiter to avoid
Unmatched ( before HERE mark in regex m/begin # Start w +ith 'begin', ( << HERE ?: # Followed by (?>[^be]+) # Not a b or e, many times, |b(?!egin) # Or a b not starting 'begin', |e(?!nd) # Or an e not starting 'end', |(??{ $re }) # Or a balanced begin/ at fudge line + 6.
A pair of {} works fine.

____________________________________________________
** The Third rule of perl club is a statement of fact: pod is sexy.

Replies are listed 'Best First'.
Re: Matching nested begin/ends
by Abigail-II (Bishop) on Jul 31, 2002 at 12:49 UTC
    Whoops.

    I added the comments after testing the code. The / in the comment messes things up.

    Abigail