Replacing a part of csv file with one variable value
I have one csv file.. ex- xyz.txt
content is like ...
I want to read this file, and then replace the first field 123, which is before the ' | ' , with one variable value, say $count , whose value is integer only .
Please help me in this !!