Looks like a CSV file so use an appropriate module for the task: Text::CSV.
In reply to Re: split string by comma by GrandFather in thread split string by comma by Anonymous Monk