in reply to Parsing delimited file contents

First of all, please use strict and use warnings and for good measure use diagnostics. Those three lines will save you a lot of pain.

Second of all, your regular expression is "not working", because you have escaped the dollar sign at the end of your pattern. So the pattern is looking for a literal dollar sign, not the end of line as I presume you intended.

Third of all, that is one remarkably inefficient regular expression! It took over a minute to run on my machine. If you just change each greedy ".*" to a non-greedy ".*?" it runs in no time. (Also your one line of sample data is missing a trailing "|" symbol.)