Re: Making thunderbird attachments searchable
[email protected] (Terrence Brannon) Wed, 06 Jan 2010 09:10:46 -0500
| Newsgroups | perl.scripts |
|---|---|
| Message-ID | <[email protected]> |
Johan Vromans wrote:
>
> The variable may contain characters that have a special meaning when
> used inside a pattern.
>
> You can use either:
>
> $partbody_boundary = quotemeta($partbody_boundary);
> if ( /$partbody_boundary/ )
>
> or
>
> if ( /\Q$partbody_boundary\E/ )
>
How about
if ( qr/$regexp/ )
Per http://perldoc.perl.org/perlop.html#Regexp-Quote-Like-Operators
you can precompile the regexp this way if necessary.