in reply to Regular Expressions
You can use variable in the pattern matching if you are using regular expressions, but it has a problem, if the variable contains text of special characters, then it is better to use \Q \E
Example:
$string=~m/\Q$filepath\E/
Warning: \Q \E should be used when you are not using regular expressions in a variable.
Regards
Franklin
Edit: g0n - corrected code tags
|
|---|