Re: ->study() loops

Mark Overmeer <[email protected]> Fri, 22 Oct 2004 20:48:56 +0200
Newsgroups gmane.comp.lang.perl.modules.mail-box
Organization MARKOV Solutions
Message-ID <[email protected]>
* Russell Mosemann ([email protected]) [041022 18:54]:
> I have a program that goes through the attachments of a message and
> attempts to get the content type with
> 
> if (defined($type = $attachment->study("Content-Type")))

It may be the problem which was detected and solved by Anthony D. Urso
last week, which had to do with superfluous blanks on the line.  Try
to change Mail/Message/Field/Structured method parse($)

    $self->datum($datum);
                                                                                
    my $found = '';
 -  until($string eq '')
 +  while($string =~ m/\S/)
    {   if($string =~ s/^\;\s*// && length $found)
        {   my $attr = Mail::Message::Field::Attribute->new($found);
       
-- 
               MarkOv

------------------------------------------------------------------------
drs Mark A.C.J. Overmeer                                MARKOV Solutions
       [email protected]                          [email protected]
http://Mark.Overmeer.net                   http://solutions.overmeer.net