munchie has asked for the wisdom of the Perl Monks concerning the following question:
With each not starting with a timestamp, and ending with "-----." I want is parsed so all the formatting (tabs and newlines) are kept. I'd like it parsed into $month, $day, $year, $time, and $body variables. I'm not exactly sure how I could use regexps and splits (or something I'm not thinking of now) to parse it.04/01/2002 19:57 FOOBARS >>my favorite candy by far! yummy! ----- 04/03/2002 07:34 Ooh, it looks as if it might rain tomorrow. note to self {buy buy buy!} ----- 04/12/2002 12:02 Energy X invasion point++ ----- 04/12/2002 12:56 Crisis resolved (that was fun!) -----
> munchie, the number munchin newb
Llama: The other other white meat!
(you had to be there :-P)
Edit kudra, 2002-05-03 Changed title
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: I need help parsing this text file!
by mla (Beadle) on Apr 02, 2002 at 01:20 UTC | |
by Kanji (Parson) on Apr 02, 2002 at 02:19 UTC | |
by belg4mit (Prior) on Apr 02, 2002 at 01:29 UTC | |
|
Re: I need help parsing this text file!
by belg4mit (Prior) on Apr 02, 2002 at 01:21 UTC | |
by munchie (Monk) on Apr 02, 2002 at 01:29 UTC | |
by belg4mit (Prior) on Apr 02, 2002 at 01:34 UTC |