#!/usr/bin/perl { local $/ = "-----\n"; while(my $note = ) { my($month, $day, $year, $time, $body) = $note =~ m#^(\d{2})/(\d{2})/(\d{4})\s+(\d{2}:\d{2})\s*\n(.*)#s; } } __DATA__ 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!) -----