in reply to MIME::Parser and applefile
I'm not sure what you mean by the parser failing. Is that some other part of your program? This part works fine for me. I'd recommend structuring your loop more like this:
foreach my $part (@parts) { next unless defined $part->head; my $type = $part->effective_type; my $filename = $part->head->recommended_filename || ""; if ($type =~ m!application/applefile!i) { # print STDERR "skipping: $type $filename\n"; next; } my @thispart = ($part->head->as_string, $part->bodyhandle->as_string); if ($type =~ /^image/i || ($type =~ /application|octet/i && $filename =~ /\.gif$/i)) { push @images, \@thispart; } elsif ($type =~ /^text/i) { push @text, \@thispart; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: MIME::Parser and applefile
by Anonymous Monk on Jul 08, 2003 at 14:12 UTC |