Prashant Kukde wrote: > > Hi, > I am trying to parse data in my data file. Every record start with the > "11111" string and end's with "22222".In between the data is separated by > delimiter "|" . I want to parse this file and get the record in one > variable and do some processing and than move for another record in file. > To, make it clear, I am enclosing the data file. > > data.txt >>> > > 11111 > larry | sun | moon | > | saturn | > 22222 > 11111 > dan | venus | mars > | pluto | xxxx | > 22222
if you can do something about the fact that there's no delimiter between your 11111 and your first field of data, and also work on getting each record onto one line, you can solve this problem easily using split. perldoc -f split -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]