CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Advanced:
Manipulating E-Mail



Jan 8, 2001, 6:19 PM

Post #1 of 2 (726 views)
Manipulating E-Mail Can't Post

I am attempting to write a program that will at certain intervals take the contents of a user's e-mail and delete the first 12 - 13 lines of the message and post the rest of the message on a webpage. I have done most of it, the only problem is deleting the first 12-13 lines. I would greatly appreciate any help you guys have.



Jan 10, 2001, 12:40 AM

Post #2 of 2 (715 views)
Re: Manipulating E-Mail [In reply to] Can't Post

To delete the 'first' 13 lines use this,

$message =~ s!(.*\n){13}!!;

That's going to toss the first 13 lines, right from the top. If you wanted to remove certain lines following some kind of character set or something you can grab onto, you could do this.

$message =~ s!<anchor or something like a table tag>(.*\n){13}!!;

But I'm assuming your trying to get rid of the email headers so I think the first code will do it.



Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives