use strict; use warnings; use Text::CSV; use Test::More tests => 2; my $in = '23 45.67 "John Marcus" Surname'; my $want = [23, 45.67, 'John Marcus', 'Surname']; my $csv = Text::CSV->new ({sep_char => ' '}); ok $csv->parse ($in), 'Parsing'; is_deeply [$csv->fields], $want, 'Fields match';