in reply to cleaner code ....

Not directly germane to cleanliness, but you also should be aware that you might want to look at a module such as Text::CSV_XS rather than just split at some point; you may be parsing "just comma separated" now, but down the road some manager's going to want to mungle this in his "database" (aka Excel) and you'll be glad you know where to look.