http://qs321.pair.com?node_id=231982


in reply to backslash in regex

The \Q disables pattern metacharacters until a \E is found, thus, if you wrote your regexp like:
if ( $dir =~ /^\Q$fav\E\\/ ) { # Note the \E after $fav!
It will match the stuff you want...

Update: placed the \E at the wrong place...

-- JaWi

"A chicken is an egg's way of producing more eggs."