{ $/ = 'myrecordsep'; while () { # do the actual work on text here } } __DATA__ myrecordsep field1=item1 field2=item2 myrecordsep ...