in reply to Parsing Pipe Delimited Multi-line File
Do you have the "insert it into a database" part designed yet? What you want to do with the data generally determines what structure to store it in. It's easy enough to put it into either an array or separate variables.
If there is some form of encoding for allowing | to be in the data of one of the fields, or allowing fields to be optionally quoted in some way, you want to look at one of the CSV modules. Otherwise, use perl's split function. (Remember that split takes a regular expression as the first argument; since | is a special character in regular expressions, you'd need to use /\|/).
|
|---|