in reply to Value of $_ inside a regex
Normally, regexps are a part of Perl expressions. Code evaluation expressions turn that around by allowing arbitrary Perl code to be a part of a regexp. A code evaluation expression is denoted (?{code}), with code a string of Perl statements. Be warned that this feature is considered experimental, and may be changed without notice.Maybe this is the right place to include some words about what you observed. But the behaviour is not a concern of $_ but instead a concern of the (?{code}) construct. In the other side, first words about $_ are:
The default input and pattern-searching space.From this point of view the behaviour of $_ is the same i observed in every block of Perl code: id est 'The current thing' or, as we speak latin, the current 'quidquid'. It seems the the current thing inside a regex is the target string, not so bad. This generally speaking; for the key-value question i need to understand it well..
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Value of $_ inside a regex (?{ code })
by Anonymous Monk on Oct 12, 2015 at 08:10 UTC | |
by Discipulus (Canon) on Oct 12, 2015 at 08:27 UTC | |
by AnomalousMonk (Archbishop) on Oct 12, 2015 at 20:16 UTC | |
by Anonymous Monk on Oct 12, 2015 at 23:45 UTC |