File::DataFile::Data is a Perl module as a interface to file data. | |
Download |
File::Data Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Richard Foley
- Publisher web site:
- http://search.cpan.org/~rfoley/Perlbug-2.93/Perlbug/Format.pm
File::Data Tags
File::Data Description
File::Data is a Perl module as a interface to file data. File::Data is a Perl module as a interface to file data.Wraps all the accessing of a file into a convenient set of calls for reading and writing data, including a simple regex interface.Note that the file needs to exist prior to using this module!See new()SYNOPSIS use strict; use File::Data; my $o_dat = File::Data->new('./t/example'); $o_dat->write("complete file contentsn"); $o_dat->prepend("first linen"); # line 0 $o_dat->append("original second (last) linen"); $o_dat->insert(2, "new second linen"); # inc. zero! $o_dat->replace('line', 'LINE'); print $o_dat->READ;Or, perhaps more seriously :-} my $o_sgm = File::Data->new('./sgmlfile'); print "new SGML data: ".$o_sgm->REPLACE( '\s*((?s).*)s*', qq|key="val"|, ) if $o_sgm;See METHODS and EXAMPLES.IMPORTANTlowercase method calls return the object itself, so you can chain calls. my $o_obj = $o_dat->read; # ! READ; # ! Requirements: · Perl
File::Data Related Software