in reply to perl regex referencing
The bracketing construct ( ... ) creates capture buffers. To refer to +the digit'th buffer use \<digit> within the match. Outside the match +use "$" instead of "\". [download]