Code blocks in regexps are anonymous subs.
Wow -
ikegami ...
It's all making sense to me now. Thanks for the enlightenment! If calling a code block in a regex is effectively the same as calling a subroutine then I understand why the scope of the
my variable in my initial code snipped is not wide enough!
Your wisdom and taking the time to share it are much appreciated.
Cheers - Pat