How do you use a variable value within a regular expression pattern properly?by Anonymous Monk
|on Sep 11, 2017 at 11:24 UTC||Need Help??|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
If I have the following code:
and I want to do this pattern matching:
it does not work because REC is right after the value of $myvar. Only if I separate them, e.g. $string="one#REC:riugfryfgfyug";
it does the pattern matching. Can you tell me what I am doing wrong?