amearse has asked for the wisdom of the Perl Monks concerning the following question:
Here are the current results with two emails:#!/usr/bin/perl $textfile = "iwn.txt"; open (TEXT, "$textfile") || die "Con't Open $textfile"; @text=<TEXT>; close(TEXT); $glob = @text; for($i=0; $i<$glob; $i++){ $_ = @text[$i]; if(/Email address:/){ print $_; } elsif(/Message-Id:/){ print $_; } }
Any advice would be much appreciated. ThanksEmail address: 19324213@glerp Message-Id: <200103160515.WAA07878@mal.elp.rr.com> Message-Id: <200103160515.WAA07878@mal.elp.rr.com> Email address: 19075680@glerp Message-Id: <200103150512.VAA27508@prxy3.ba.best.com> Message-Id: <200103150512.VAA27508@prxy3.ba.best.com>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(Ovid - remove duplicates) Re: Seeing double
by Ovid (Cardinal) on Apr 20, 2001 at 01:53 UTC | |
|
Re: Seeing double
by stephen (Priest) on Apr 20, 2001 at 01:58 UTC | |
|
(jeffa) Re: Seeing double
by jeffa (Bishop) on Apr 20, 2001 at 01:26 UTC | |
|
Re: Seeing double
by indigo (Scribe) on Apr 20, 2001 at 01:35 UTC | |
|
Re: Seeing double
by satchboost (Scribe) on Apr 20, 2001 at 01:26 UTC | |
|
Re: Seeing double
by ChemBoy (Priest) on Apr 20, 2001 at 01:33 UTC |