in reply to Re^3: extracting name & email address
in thread extracting name & email address
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) ); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: extracting name & email address
by Anonymous Monk on Feb 24, 2015 at 03:33 UTC | |
by peterr (Scribe) on Feb 24, 2015 at 04:43 UTC | |
|
Re^5: extracting name & email address
by peterr (Scribe) on Feb 24, 2015 at 23:42 UTC | |
by peterr (Scribe) on Feb 25, 2015 at 00:07 UTC | |
by peterr (Scribe) on Feb 25, 2015 at 02:34 UTC | |
by peterr (Scribe) on Mar 04, 2015 at 00:21 UTC | |
by tye (Sage) on Mar 04, 2015 at 04:18 UTC | |
|