[lug] Perl

Jeff Schroeder jeff at neobox.net
Sat Feb 11 15:05:23 MST 2006


Bill asked:

> But how do I get a '2' into the middle of two match variables?

Enclose the sub-pattern numbers in curly braces:

s/([NESW]) ([NS][EW])/${1}2${2}/;

HTH,
Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20060211/4e62c3cc/attachment.pgp>


More information about the LUG mailing list