It was Wednesday, February 26, 2003 when Shawn took the soap box, saying: : I have an issue with this snipppet: : if ($file =~ /^${name}(.*)${suf}$/) { : : ...and that is, that the $name variable can end in a couple "+" chars, : or some other special characters. This results in: : : Nested quantifiers in regex; marked by <-- HERE in m/^libsigc++ <-- HERE : (.*).tar.bz2$/ at /03data/garnome-0.21.2/gnome/Report line 91.
You need to escape things like this. If you don't want special characters like '+' to be notices as special, wrap that part of the regex in '\Q' and '\E' sequences. This would make your regex look something like this (when the needless curlies are removed): /^\Q$name\E(.*)$suf$/ Enjoy! Casey West -- Shooting yourself in the foot with Fortran You shoot yourself in each toe, iteratively, until you run out of toes; then you shoot the sixth bullet anyway since no exception processing was anticipated. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]