in reply to Open File and Parse file line by line
Map is your friend!!!!!! jeffa wrote a nice little tutorial about it here
A quick example that "should" help on your comma to pipe switch issue.
open (FILE, "foo.txt"); my @lines = map { s/,/|/g; $_; } <FILE>; close FILE;
Mind you this is just a snippet taken and modified from the tutorial. You might need a little more "tunning" for your needs.
|
|---|