The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Text::CSV::Easy_PP - Easy CSV parsing and building implemented in PurePerl

SYNOPSIS

use Text::CSV::Easy_PP qw(csv_build csv_parse);

my @fields = csv_parse($string);
my $string = csv_build(@fields);

DESCRIPTION

Text::CSV::Easy_PP is a simple module for parsing and building simple CSV fields.

Integers do not need to be quoted, but strings must be quoted:

1,"two","three"     OK
"1","two","three"   OK
1,two,three         NOT OK

If you need to use a literal quote ("), escape it with another quote:

"one","some ""quoted"" string"

SUBROUTINES

csv_build( List @fields ) : Str

Takes a list of fields and will generate a csv string. This subroutine will raise an exception if any errors occur.

csv_parse( Str $string ) : List[Str]

Parses a CSV string. Returns a list of fields it found. This subroutine will raise an exception if a string could not be properly parsed.

SEE ALSO

Text::CSV
Text::CSV::Easy
Text::CSV::Easy_XS

AUTHOR

Thomas Peters, <weters@me.com>

COPYRIGHT AND LICENSE

Copyright (C) 2013 by Thomas Peters

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.4 or, at your option, any later version of Perl 5 you may have available.