http://qs321.pair.com?node_id=947253


in reply to split string by comma

Looks like a CSV file so use an appropriate module for the task: Text::CSV.

True laziness is hard work