Re: Parsing multiline data

2004-10-23 Thread Zeus Odin
Make sure each section is separated by a new line, including the last section. If there is no new line at the end of the file, the last record will be omitted. The following puts each field in %data with the field name being the key and the field value as the key's value, and it splits each line

Re: Parsing multiline data

2004-10-21 Thread Bee
multiline data Hello everyone, I have several sections of data that look like this: Title: DESIGN JOURNAL (COVER) Purpose: Product Spotlight Penetration: National Role: Media Relations, Content Support Results: Elevated Publicity and Brand Awareness Credits: Evolutif Senior Management Team Award

Re: Parsing multiline data

2004-10-21 Thread David le Blanc
On Thu, 21 Oct 2004 14:55:28 +0800, Bee [EMAIL PROTECTED] wrote: use strict; open F, sourcefile.txt; local $/ = \n\n; my @sections = F; close F; print Section $_ :\n $sections[$_]\n\n for @sections; What are you doing to poor Kevin? If you meant: print Section $_:\n

Re: Parsing multiline data

2004-10-21 Thread Bee
print Section $_ :\n $sections[$_]\n\n for @sections; What are you doing to poor Kevin? If you meant: print Section $_:\n $sections[$_]\n\n for 0..$#sections; then I'll forgive you :-) Oops. What a mistake !! Thousands sorry... ( I can't forgive myself ) ~^.^~ Bee --

Parsing multiline data

2004-10-20 Thread Kevin Old
Hello everyone, I have several sections of data that look like this: Title: DESIGN JOURNAL (COVER) Purpose: Product Spotlight Penetration: National Role: Media Relations, Content Support Results: Elevated Publicity and Brand Awareness Credits: Evolutif Senior Management Team Award: 2001 Award

Re: Parsing multiline data

2004-10-20 Thread David le Blanc
On Wed, 20 Oct 2004 22:27:20 -0400, Kevin Old [EMAIL PROTECTED] wrote: Hello everyone, I have several sections of data that look like this: Title: DESIGN JOURNAL (COVER) Purpose: Product Spotlight Penetration: National Role: Media Relations, Content Support Results: Elevated Publicity