Thanks that worked and was the simple solution I was looking for.

        Another question though, is there a simple way to uniq an array, ie search 
through it and removing all duplicates? Up until now I have been making a clumsy 
subroutine to do this, but I am wondering if there is something more simple that will 
handle this.

Thanks for your time,

=-= Robert Thompson


On Tue, Oct 30, 2001 at 03:52:44AM +0100, Andrea Holstein wrote:
> 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]

Reply via email to