On Mon, 2006-05-06 at 10:20 +0800, joseph wrote: > @line = () if /^DATE:/; ## set array @line to an empty list if line begin > DATE?
Yes, this will clear out the previous record. > push @line, $_; ## then push the value of line to an empty @line array? @line is empty only if this is the first time thru the loop, or the current line starts with 'DATE:'. Otherwise, it will have part of a record in it. > > Am i right? -- __END__ Just my 0.00000002 million dollars worth, --- Shawn "For the things we have to learn before we can do them, we learn by doing them." Aristotle * Perl tutorials at http://perlmonks.org/?node=Tutorials * A searchable perldoc is at http://perldoc.perl.org/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>