Tie::Array::FileWriter

A Perl module for writing records to files as items are pushed onto a virtual array
Download

Tie::Array::FileWriter Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Gregor N. Purdy
  • Publisher web site:
  • http://search.cpan.org/~gregor/

Tie::Array::FileWriter Tags


Tie::Array::FileWriter Description

A Perl module for writing records to files as items are pushed onto a virtual array Tie::Array::FileWriter is a write-only array that can only be written via push. It ignores anything pushed onto it that is not an array reference. Elements of array references are joined by the field delimiter and written to the output file, followed by the record delimiter.You can write fixed-length records by ensuring the fields that are passed in are preformatted to thier desired fixed lengths and setting the field and record delimiters to empty strings.The default field delimiter is the vertical bar ('|', also known as 'pipe'), and the default record delimiter is newline ("\n").You can pass in either an already opened FileHandle object, or a file name. If you pass in a FileHandle object, the file will not be closed by Tie::Array::FileWriter.SYNOPSIS use Tie::Array::FileWriter; my @output; tie @output, 'file.dat', ',', "\n"; # Write to file 'file.dat', use comma as field delimiter push @output, ; push @output, ; untie @output; Requirements: · Perl


Tie::Array::FileWriter Related Software