I know this is pretty simplistic, but is a good start possibly.
One of the tools we use where I work is essentially a checklist of things that need to be done that day, at certain times. It can generate a CSV, but instead of using ',' as a delimiter, it uses ', ' with that extra whitespace - so after using Text::ParseWords to split up the CSV, I'd run this regex on each element to remove the leading whitespace
map s/^\s//, @fields;
That's not a direct sample of the code (I don't have it on this machine) but that's what it looked like as far as I remember.
~Brian