What you really want is this:

    return unless $d{-text} =~ s/^\"*\Q$mbx\E\"*\s+//;

Using the \Q and \E disables regex expansions between them.

On 19 Dec 2002, Edward Rudd wrote:

> Here's a quick hack to fix a bug with the IMAP::Admin perl module in
> cyrus IMAPD version 2.1.11
> on line 269:
>       return unless $d{-text} =~ s/^\"*$mbx\"*\s+//;
> the regex causes a perl error with folder names with +s in them. ie "C
> And C++"
>
> I *hacked it* thusly..
>       my $tmp = $mbx;
>       $tmp =~ s/\+/\\++/g;
>       return unless $d{-text} =~ s/^\"*$tmp\"*\s+//;
> There are probably more regex keywords that need to be escaped, but that
> fixed the immediate problem for me...
> --
> Edward Rudd <[EMAIL PROTECTED]>
>
>

Reply via email to