Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Re: backslash in regexby Pardus (Pilgrim) |
on Feb 02, 2003 at 11:00 UTC ( [id://231985]=note: print w/replies, xml ) | Need Help?? |
if ( $dir =~ /^\Q$fav\\\E/ ) { # Note the \E at the end!
won't work -- the problem is under \Q modifier the backslash at the end matches wrong
if ( $dir =~ /^\Q$fav\E\\/ ) {
works
-- Jaap Karssenberg || Pardus (Larus)? <pardus@cpan.org> >>>> Zoidberg: So many memories, so many strange fluids gushing out of patients' bodies.... <<<<
In Section
Seekers of Perl Wisdom
|
|