Robert Thompson wrote:
> ...
>
> for (my $i = 0; $i < @mess_order; ++$i) {
> if ($mess_order[$i] =~ /^$remove$/i) {
> $pos = $i;
> }
> }
>
> ...
> There are about eighty e-mails that I am testing with, and all the ones that have
>the problem are ones with a $ in the Message-ID, so that leads me to believe that
>Perl is interpreting the $ as a variable in the =~ comparrison. I am not 100% sure
>about this since I am using strict, and I would think strict would produce an error
>for that.
>
Try
for (my $i = 0; $i < @mess_order; ++$i) {
if ($mess_order[$i] =~ /^\Q$remove\E$/i) {
$pos = $i;
}
}
The \Q expr \E syntax quotes all meta characters found in the expr,
especially \Q$var\E is the standard way to avoid interpolation of the
content of $var.
Best Wishes,
Andrea
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]