Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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

by dave_the_m (Monsignor)
on Jan 16, 2022 at 09:42 UTC ( [id://11140495] : note . print w/replies, xml ) Need Help??


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.