package AnyData::Format::ThreeSharp; use base 'AnyData::Format::Base'; sub write_fields { shift; sprintf "%s\n",join '###',@_ } sub read_fields { split '###', $_[1] }
Should probably be split '###', $_[1], -1
otherwise trailing empty fields will be removed.
Probably so from a performance standpoint, but it's not necessary from a parsing standpoint. AnyData automatically compares the number of fields returned to the number of columns expected and pads with NULLs. DBD::CSV does also. That means the two CSV records for Bob are the same (e.g. $sth->dump_results will show "'Bob',undef,undef" for both):
name,rank,serial_number Joe,General,5440 Bob,, Bob
-- Jeff