in reply to Can't do dereference when running code inserted inside regex

When executing a regex code block, perl temporarily alises $_ to the string currently being matched. So $_ is set to "foobar"

Dave.

  • Comment on Re: Can't do dereference when running code inserted inside regex