in reply to Re^2: perl remove mail(textfile) header(eg. title, from,Delivered-To,Received)
in thread perl remove mail(textfile) header(eg. title, from,Delivered-To,Received)
Having just now fiddled with Mail::Internet and failed to get it working, let me instead provide the following:
#!/usr/bin/perl -w # # while(<>) { last if ( /^\s*$/ ); } print <>;
Running this using the message as the input file will produce the output
Martin A posted: Tassos Papadopoulos, the Greek sculptor behind the plan, judged that t +he limestone of Mount Kerdylio, 70 miles east of Salonika and not far fro +m the Mount Athos monastic community, was ideal for the patriotic sculpture. + As well as Alexander's granite features, 240 ft high and 170 ft wide, +a museum, a restored amphitheatre and car park for admiring crowds are planned --------------------- So is this mountain limestone or granite? If it's limestone, it'll weather pretty fast. ------------------------ Yahoo! Groups Sponsor ---------------------~- +-> 4 DVDs Free +s&p Join Now http://us.click.yahoo.com/pt6YBB/NXiEAA/mG3HAA/7gSolB/TM ---------------------------------------------------------------------~ +-> To unsubscribe from this group, send an email to: forteana-unsubscribe@egroups.com Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/ter +ms/
as requested.
Since the divider between the mail header and the mail body is just a blank line, this script should be dead easy for you. I highly recommend you get a good book that explains E-Mail in some detail, perhaps something from O'Reilly.
A good book on Perl would also be an excellent investment.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: perl remove mail(textfile) header(eg. title, from,Delivered-To,Received)
by stillcool (Initiate) on Apr 27, 2009 at 10:46 UTC | |
|
Re^4: perl remove mail(textfile) header(eg. title, from,Delivered-To,Received)
by stillcool (Initiate) on Apr 27, 2009 at 13:24 UTC | |
by talexb (Chancellor) on Apr 27, 2009 at 16:47 UTC | |
by stillcool (Initiate) on Apr 28, 2009 at 17:18 UTC | |
by Corion (Patriarch) on Apr 28, 2009 at 17:32 UTC |