- publishing free software manuals
Perl Language Reference Manual
by Larry Wall and others
Paperback (6"x9"), 724 pages
ISBN 9781906966027
RRP £29.95 ($39.95)

Sales of this book support The Perl Foundation! Get a printed copy>>>

12.6.3 Named referencing

Also new in perl 5.10.0 is the use of named capture buffers, which can be referred to by name. This is done with \g{name}, which is a backreference to the capture buffer with the name name.

To be compatible with .Net regular expressions, \g{name} may also be written as \k{name}, \k<name> or \k'name'.

Note that \g{} has the potential to be ambiguous, as it could be a named reference, or an absolute or relative reference (if its argument is numeric). However, names are not allowed to start with digits, nor are they allowed to contain a hyphen, so there is no ambiguity.

ISBN 9781906966027Perl Language Reference ManualSee the print edition