While im pretty sure you know this, ill mention it for other readers:
@- and @+ are actually thin wrappers around the way that Perl internally tracks where matches and capture buffers start and stop. The variables $& and $1 and friends actually are ties that combine the data in @- and @+ with a copy of the string matched against to produce the magic variables. If you have ever wondered why @- and @+ exist and why they are such strange things its because they are really just tied variables that wrap C arrays*. Larry is on record saying that he considers them a bad interface because of this.
* in Perl 5.9.4 Nicholas Clark merged the two arrays into a single array of structs containing two STRLEN's (long integers).
In reply to Re^2: @- and @+ question
by demerphq
in thread @- and @+ question
by Cristoforo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |