|
NAMEText::Delimited - Module for parsing delimited text filesSYNOPSISText::Delimited provides a programattical interface to data stored in delimited text files. It is dependant upon the first row of the text file containing header information for each corresponding "column" in the remainder of the file.After instancing, for each call to Read the next row's data is returned as a hash reference. The individual elements are keyed by their corresonding column headings. USAGEA short example of usage is detailed below. It opens a pipe delimited file called 'infile.txt', reads through every row and prints out the data from "COLUMN1" in that row. It then closes the file.my $file = new Text::Delimited; $file->delimiter('|'); $file->open('infile.txt'); my @header = $file->fields; while ( my $row = $file->read ) { print $row->{COLUMN1}, "\n"; } $file->close; The close() method is atuomatically called when the object passes out of scope. However, you should not depend on this. Use close() when approrpiate. Other informational methods are also available. They are listed blow: METHODS:
EXPORTABLE METHODSFor convienience, the following methods are exportable. These are handy for quickly writing output delimited files.
BUGS AND SOURCEBug tracking for this module: https://rt.cpan.org/Dist/Display.html?Name=Text-Delimited Source hosting: http://www.github.com/bennie/perl-Text-Delimited VERSIONText::Delimited v2.12 (2022/01/06) COPYRIGHT(c) 2004-2022, Phillip Pollard <bennie@cpan.org> LICENSEThis source code is released under the "Perl Artistic License 2.0," the text of which is included in the LICENSE file of this distribution. It may also be reviewed here: http://opensource.org/licenses/artistic-license-2.0AUTHORSHIPI'd like to thank PetBlvd for sponsoring continued work on this module. http://www.petblvd.com/ Additional contributions by Kristina Davis <krd@menagerie.tf> Based upon the original module by Andrew Barnett <abarnett@hmsonline.com> Originally derived from Util::TabFile 1.9 2003/11/05 With permission granted from Health Market Science, Inc.
Visit the GSP FreeBSD Man Page Interface. |