in reply to Re: my versus our in nested regex
in thread my versus our in nested regex

...which means that when the regex is being compiled, $regex doesn't yet exist.

Actually, this is incorrect. $regex does exist but refers to an (undefined) global variable with the same name at that stage. Which the following with strict will reveal:

$ perl -Mstrict -e 'my $foo = $foo' Global symbol "$foo" requires explicit package name at -e line 1. Execution of -e aborted due to compilation errors.

Liz