logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: Fetching messages error: msg#00022

Subject: Re: Fetching messages error
* Tracey, Michael (MTracey@xxxxxxxxxxxxx) [031201 20:49]:
> I've got an array of messages that I'm foreaching through as such:

You have to tell me what folder type you use, and the versions of
Mail::Box and Perl.  I cannot reproduce it as such.

>               my $mgr = Mail::Box::Manager->new;
>               my $folder = $mgr->open('$mailbox', folderdir => "$maildir",
                                        ^^^^^^^^^^ are you sure?

>               my ($mesg);
                   ^^^^^^^ Duh?

>               print @msgid;  # debug print
>               foreach(@msgid){
>                       $mesg = $folder->message($_);
>                       print $mesg->seqnr; # debug print
>                       ...
>               }
> 
> I always get twenty-one prints of $mesg, with the first always message 0.
> If I am asking for 0-19, I get message 0 twice.
> 
> Output would look like:
> 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
> 0 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
> Any help would be appreciated.

If you have 20 items in @msgid, how can it ever loop more than 20 times?
print a '#' after each seqnr, and see which call produces two numbers.
-- 
               MarkOv

------------------------------------------------------------------------
drs Mark A.C.J. Overmeer                                MARKOV Solutions
       Mark@xxxxxxxxxxxx                          solutions@xxxxxxxxxxxx
http://Mark.Overmeer.net                   http://solutions.overmeer.net




<Prev in Thread] Current Thread [Next in Thread>