The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
#! /usr/local/bin/perl -w

use Parse::RecDescent;

my $PCSV_parser = Parse::RecDescent->new(<<'EOGRAMMAR');

	file:	<skip: '[ \t]*'> line(s?)

	line:	field(s? /,|=>/) "\n" 	{ $item[1] }

	field:	<perl_quotelike>	{ join "", @{$item[1]} }
	     |	/((?!,|=>).)*/

EOGRAMMAR

use Data::Dumper;

print  Data::Dumper->Dump($PCSV_parser->file(join "", <DATA>));

__DATA__
comma,separated=>values
with,q{a,perl,twist},/to them/