Bass-Fighter has asked for the wisdom of the Perl Monks concerning the following question:
I have 2 mails to test the system. the first gives the output what I want. the second gives this: Can't locate object method "binmode" via package "IO::File" at /usr/lib/perl5/site_perl/5.8.0/MIME/Body.pm line 437. does anyone know how to solve this?#!usr/bin/perl use v5.8.0; use warnings; use strict; use MIME::Parser; my $parser = MIME::Parser->new(); $parser->output_under('/tmp'); my $entity = $parser->parse(\*STDIN); if ( $entity->is_multipart ) { for my $part ( $entity->parts ) { my $head = $part->head; if ( my $filename = $head->recommended_filename ) { print "Attachment name: $filename\n"; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: attachment logging
by Anonymous Monk on Dec 18, 2008 at 11:10 UTC | |
by Corion (Patriarch) on Dec 18, 2008 at 11:12 UTC | |
by Bass-Fighter (Beadle) on Dec 18, 2008 at 12:30 UTC | |
by oko1 (Deacon) on Dec 18, 2008 at 12:55 UTC | |
by Bass-Fighter (Beadle) on Dec 18, 2008 at 13:26 UTC |