Added an attachment 'stripper' module, but now there is no output ..
One thing though, it processed all the files very quickly. LOL#!/usr/bin/env perl # use strict; use warnings; use File::Find; use File::Slurp qw( read_file ); use Email::Address; use Email::MIME::Attachment::Stripper; my $directory = '/home/*****/Mail/.family.directory/Browne, Bill & Mar +tha';';'; my $outfile = 'output.txt'; my @found_files; find( sub { push @found_files, $File::Find::name }, $directory ); foreach(@found_files){ my $file = "$_"; if (-f $file) { print $_,"\n"; my $intext = File::Slurp::read_file( $file ); my $stripper = Email::MIME::Attachment::Stripper->new($intext); my @emails = Email::Address->parse( $stripper ); File::Slurp::write_file( $outfile, {append => 1 }, join("\n", @e +mails) ); } }
In reply to Re^4: extracting name & email address
by peterr
in thread extracting name & email address
by peterr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |