Text::CSV::BulkData

Generate CSV file with bulk data
Download

Text::CSV::BulkData Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Publisher Name:
  • Kazuhiro Sera
  • Publisher web site:
  • http://search.cpan.org/~sera/

Text::CSV::BulkData Tags


Text::CSV::BulkData Description

Generate CSV file with bulk data Text::CSV::BulkData is a Perl module to generate CSV files with bulk data.You can modify incremented values with using addition(+), subtraction(-), multiplication(*), division(/) and residue(%).Precedence of operators is '*', '/', '%', '+', '-'.The right of the decimal point are truncated.Beginning with no operators means fixed value(integer or string).SYNOPSIS use Text::CSV::BulkData; my $output_file_1 = "/your/dir/example.dat"; my $format_1 = "0907000d,JPN,160-d,type000d,0120444d,2008041810d00,2008041811d00\n"; my $pattern_1 = ; my $gen = Text::CSV::BulkData->new($output_file_1, $format); my $pattern_1 = ; $gen->initialize ->set_pattern($pattern_1) ->set_start(59) ->set_end(62) ->make; my $output_file_2 = "/your/dir/yetanotherfile.dat"; my $format_2 = "0907000d,JPN,160-d,type000d,0120444d,20080418d0000,20080419d0000\n"; my $pattern_2 = ; $gen->set_output_file($output_file_2) ->set_format($format_2) ->set_pattern($pattern_2) ->set_start(239) ->set_end(241) ->make;This sample generates following csv file./your/dir/example.dat 09070000059,JPN,160-0236,type0000057,01204440119,20080418105800,20080418111900 09070000060,JPN,160-0240,type0000058,01204440121,20080418105900,20080418112000 09070000061,JPN,160-0244,type0000059,01204440123,20080418100000,20080418112100 09070000062,JPN,160-0248,type0000060,01204440125,20080418100100,20080418112200/your/dir/yetanotherfile.dat 09070000239,JPN,160-0023,type0000358,01204440001,20080418220000,20080419230000 09070000240,JPN,160-0024,type0000360,01204440000,20080418230000,20080419230000 09070000241,JPN,160-0024,type0000361,01204440001,20080418000000,20080419230000 Requirements: · Perl


Text::CSV::BulkData Related Software