[lug] Perl

Bill Thoen bthoen at gisnet.com
Sat Feb 11 15:03:00 MST 2006


Using Perl, if I  wanted to substitute something like "E NW" with "E2NW",
how do I write the substitution command? If I try:

s/([NESW]) ([NS][EW])/$12$2/;

it doesn't work (for obvious reasons.) But how do I get a '2' into the
middle of two match variables?

- Bill Thoen




More information about the LUG mailing list