to answer you... in all of the perl regex code ive ever written or seen contributed by others, ive, until now, not seen the form you present, where a scalar is seen as a part of the regex (/$var/).

with my limited knowledge, i had assumed i needed to somehow create the regex command in a form where the variable substitution was previously done. hence my attempt to build a regex command (using \x## for special characters) then evaling it.

your approach is so simple, that i never would have guessed it could have worked.

by the way, at a different perl mailing list, another perl guru found the reason my code did not work, as initially written, was becaues a few variables needed to be predeclared by the use of 'my'. by declaring the variables i used, my code magically worked.

by the way, at a different perl mailing list, another perl guru found the reason my code did not work, as initially written, was becaues a few variables needed to be predeclared by the use of 'my'. by declaring the variables i used, my code magically worked.

Thats odd because if you are using "strict" your code would not have even compiled to know if it worked or not as you had it written. But maybe on the mailing list you included the fact you were getting an error about variables not being packaged. -------------------------------------------------