[Melbourne-pm] Text::CSV null output options?

Malcolm Herbert melbourne-pm at mjch.net
Mon Jun 30 22:48:42 PDT 2014

Is there a way to tell Text::CSV _not_ to escape certain strings?

Alternatively, can Text::CSV be told to emit a particular string on an
undefined value? The manual page implies 'no' ...

Would some other CSV-manipulating module be better suited for this?

I'm writing some simple scripts to rip apart some Excel files I've been
given and inject these into a PostgreSQL database to do slightly more
interesting things on the data therein.

I've been using Spreadsheet::ParseExcel to read the data but felt that I
was recreating the wheel with my own code to output these records as a
TSV file

In an attempt to avoid rework I've started using use Text::CSV however
the problem I'm facing now is that there doesn't appear to be a way to
tell Text::CSV not to escape the \N strings I need to appear in the
output so that PostgreSQL interprets these fields as NULL

Has anyone else faced this issue before?


Malcolm Herbert
mjch at mjch.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://mail.pm.org/pipermail/melbourne-pm/attachments/20140701/a6e58934/attachment.bin>

More information about the Melbourne-pm mailing list