Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!masscomp!ocpt!tsdiag!ticnj!srs From: srs@ticnj.UUCP (Scott Strool) Newsgroups: comp.lang.perl Subject: formatting DB records Keywords: text processing records db split Message-ID: <905@ticnj.UUCP> Date: 11 Feb 91 19:58:02 GMT Organization: IEX Corporation Red Bank, NJ Lines: 27 I hope that someone can point me in the correct direction. I have a file that is output from a database. The fields are '|' separted. I want to write a script that will read the file and print the records. I would like to break the line into fields, each field is the text between the pipe characters. I then want to sort on the key fields and then print the records without the pipe chars. What Perl function/commands would I need to use. I looked at split but could not get that to split my line of text into the separate named fields. Here is my split line: ($a,$b,$c) = split(/|/); print $a, $b, $c; ... prints nothing. -- Scott Strool (908) 747-4700 srs@iex.com IEX Corporation 125 Half Mile Rd. Red Bank, NJ 07701