phantom20x has asked for the wisdom of the Perl Monks concerning the following question:
The count was added only to test the first 1000 pieces or so of data. As to that, the data was not even being pushed into @list. Any help would be great. Thanks! ~Phantom **UPDATE** What I was attempting now works with this code:while(<>){ if ($_=~"Sent:"){ $count += 1; push (@dates, $_); } if ($count < 1){ if ($_=~"Per Domain Breakdown"){ until ($_=~"From:"){push (@list, $_);} push (@list, "BREAK $count"); } } } print @dates; print @list[1];
As Funkymonk and TGI pointed out I misunderstood my program, and the until hurt it. Thanks for all the help! ~Phantomwhile(<>){ if (/^[0-9]+, |Sent:/){ push (@logs, $_); } } print $logs[0]; print $logs[1];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Memory Problems with Parsing
by FunkyMonk (Bishop) on Jul 30, 2007 at 08:13 UTC | |
by phantom20x (Acolyte) on Jul 30, 2007 at 13:54 UTC | |
by TGI (Parson) on Jul 30, 2007 at 16:55 UTC | |
by phantom20x (Acolyte) on Aug 01, 2007 at 04:44 UTC | |
|
Re: Memory Problems with Parsing
by moritz (Cardinal) on Jul 30, 2007 at 09:23 UTC |