in reply to Re^3: Inexplicable uninitialized value when using (?{...}) regexp construct.
in thread Inexplicable uninitialized value when using (?{...}) regexp construct.
Does this sound reasonable?
Inside the (?{...}) block, $_ refers to the string the regular express +ion is matching against. You can also use pos() to know what is the c +urrent position of matching withing this string. + Currently, lexical (my) variables within a (?{...}) block can be + problematic, as their use may lead to the unintentional creation of + a lexical closure. For that reason it is usually advisable to + use globals in (?{...}) blocks. The code is properly scoped in the following sense: If the assertion i +s backtracked (compare "Backtracking"), all changes introduced after +localization are undone, so that
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Inexplicable uninitialized value when using (?{...}) regexp construct.
by BrowserUk (Patriarch) on Sep 29, 2004 at 01:36 UTC |