troubleshooting Question

Searching for 1 line and then joining the found line and the line below it into one variable. PERL

Avatar of teksavers
teksavers asked on
Programming
3 Comments1 Solution247 ViewsLast Modified:
I need help with this code:

I have a email message in an @array.  I would like to search for the Subject: line and then store the subject line and the line below the subject line into 1 variable.

For example:

My email @array looks like this:

From: From email
Date: Date
Subject: This is a test subject, but because the subject line is too long it wraps
     to the next line like this.
Body:
Message body, etc. etc.. etc..

I need the Perl code to find the Subject: line and then join the line below it so that I can assign the following to a variable:

This is a test subject, but because the subject line is too long it wraps to the next line like this.

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros