Link to home
Start Free TrialLog in
Avatar of lbdev
lbdevFlag for United States of America

asked on

how to delete

I have an email message in the array @msg (each element is a line of the email).  I want to strip out everything before the first empty line, also stripping that empty line.  There are a variable amount of lines before the first empty line.

What is the most efficient way to do this (shift through the array?)

Thanks

P I 21-07-2009 02:58:43 0000 ____ ____ <notice@whatever.com>
A email.host.net [288.149.118.12]
S SMTP [109.2.201.221]
R W 21-07-2009 02:58:44 0000 ____ _FY_ <sdfasad@somehost.net>
 
 
Received: from somehost ([22.2.222.222] verified)
  by myhost.net (CommuniGate Pro SMTP 5.1.8)
  with ESMTPS id 209182505 for user@myhost.net; Mon, 20 Jul 2009 21:58:44 -0500
Message-Id: <200907210255.n6L2tfZV087630@host>
Reply-To: <user@gmail.com>
From: "Mr. Ron Mills"<user@gmail.com>
Subject: Ministry of Finance' ATM CARD approval.
Date: Mon, 20 Jul 2009 19:57:00 -0700
 
 
Dear user,
 
Here is your email text.
 
Thanks.

Open in new window

Avatar of ozo
ozo
Flag of United States of America image

@msg= grep{(!/\S/..0)>1}@msg;
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lbdev

ASKER

Perfect!