I posted the code on use.perl.org, and already I have my first suggested change...I guess I didn't need to use the '(?{})' thing in the substitution, and could have just used a '/e' modifier instead, and incorporated the code into the RHS of the substitution :-) -Doug