in reply to Regex problem

my $string = '00CH,Gateshead MCD,619,172.90,158.94,186.87,,537,87.42,7 +9.61,95.23,,11 +56,126.89,119.29,134.50 '; my (@ary); (undef,undef,@ary) = split(/\s*,\s*/, $string);

should take care of whitspaces before or after the comma as well.