in reply to split string by comma
Looks like a CSV file so use an appropriate module for the task: Text::CSV.