Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uakari.primate.wisc.edu!caen!news From: stealth@engin.umich.edu (Mike Pelletier) Newsgroups: comp.lang.perl Subject: Inconsistant fields -- distinguishing? Message-ID: <8Y0+ABB@engin.umich.edu> Date: 3 Jun 91 22:03:48 GMT Organization: University of Michigan Engineering, Ann Arbor Lines: 24 For my first trick... I'm an utter perl novice, so tone your responses appropriately. ;-) I'm working on a mail log parser, and I'm a bit perplexed as to how to deal with lines that have inconsistant field types. For instance: Jun 3 17:58:10 engin sendmail[12345]: AA01695: to=, delay=11:55:01, stat=Deferred Jun 3 17:58:10 engin sendmail[12345]: SmtpIn/Out NULL for DATA ---- The first one has a queue id, AA01695, whereas the second one just has the information right there, associated with the previous one only by the bracketed process-id (which I *didn't* make up -- it actually is there in the log file...) Any ideas how to handle this in perl? Does anyone have a mail log parser that they could send to me for educational perusal? Thanks for your help, folks! -- Mike Pelletier | "Wind & waves are breakdowns in the commitment of The University of Michigan | getting from here to there, but they are the con- College of Engineering | ditions for sailing. Not something to eliminate, Student/Systems Admin | but something to dance with."