Hi all. Need some help. I have a data file that looks like this...
Date Team Name 1 Team Name 2 Field1 Field2 FieldX Date Team Name 3 Team Name 4 Field 1 FieldX and so on... Each entry will have the data and team 1 and 2's name. But the number of fields will be variable... I would really like to turn this file into something like this... Date:Team Name 1:Team Name 2:Field1:Field2:FieldX Date:Team Name 3:Team Name 4:Field1:Field2:FieldX I'm not really sure where to get started. I could load all of the values into an array (The file won't be too big) and print them back out all separated by colons, then run a regular expression to insert a blank line when it detects the date pattern. I don't know how to go about loading the data into an array or hash, and then printing it out formatted on one line until the next date is detected. Am not sure how to combine those steps. Any help is greatly appreciated... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>