in reply to Re^2: Pattern Matching, left-to-right
in thread Pattern Matching, left-to-right
Yep, although that wasn't really the point of my excercise. :-) I'd write that one a little differently:
my %xlat = ( F => '|', S => '^', T => '&', R => '~' E => '\\', ); while( m/ \G .*? \\([FSTRE])\\ /gsx ){ substr $_, pos() - 3, 3, $xlat{ $1 }; }
Update: same change as in parent node update applies.
Makeshifts last the longest.
|
|---|