UPDATE: Elisheva has given a better answer. My answer assumes that the data was read from a file, one line at a time. Her answer recognizes that each of the parts of the line have not been read in together, but rather individually as separate records, such as from a database. I had thought your difficulty was in not seeing the pipe at the beginning and end of the line, but if indeed you were not seeing any pipes at all, then her answer will give the proper approach.