NAME

LibWeb::File - File manipulations for libweb applications

SUPPORTED PLATFORMS

BSD, Linux, Solaris and Windows.

REQUIRE

  • No non-standard Perl's library is required.

ISA

  • LibWeb::Class

SYNOPSIS

  use LibWeb::File;
  my $fh = new LibWeb::File();

  $lines = $fh->read_lines_from_file( -file => '/home/me/file1' );

  $fh->write_lines_to_file(
                            -file => '/home/me/file2',
                            -lines => $lines
                          );

ABSTRACT

This class provides several methods to manipulate text files.

The current version of LibWe LibWeb::File is available at

   http://libweb.sourceforge.net

Several LibWeb applications (LEAPs) have be written, released and are available at

   http://leaps.sourceforge.net

DESCRIPTION

METHODS

read_lines_from_file()

Params:

  -file =>

Open, read all lines, close -file and return the lines in an ARRAY reference.

write_lines_to_file()

Params:

  -file =>, -lines =>

Pre:

  • -lines is an ARRAY reference to lines which are scalars.

Post:

  • Overwrite -file with the lines.

AUTHORS

Colin Kong (colin.kong@toronto.edu)

CREDITS

BUGS

SEE ALSO

LibWeb::Class.