in reply to executing code within a regex

Note that there are many problems with using lexical variables within (?{...}) contructs with current Perl; in your real program (as opposed to the snippet above), is where @cond is declared and where it is accessed more involved, eg is part of the code actually contained within a function?

Replies are listed 'Best First'.
Re: Re: executing code within a regex
by ColonelPanic (Friar) on May 10, 2004 at 12:37 UTC
    Yes, it turned out that when I ran the code as displayed above, it worked. The problem went away when I moved the @cond variable to a greater scope. Thanks everyone for your help.


    When's the last time you used duct tape on a duct? --Larry Wall