Try using this regex to strip out the spaces around commas before you do your parsing:
$blah =~ s/\s*(,)\s*/$1/g;
In reply to Re: clearing spaces from data input
by jryan
in thread clearing spaces from data input
by chriso
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |