File::Open::OOP - An Object Oriented way to read and write files
Reading lines one-by-one
use File::Open::OOP qw(oopen); my $fh = oopen 'filename'; while ( my $row = $fh->readline ) { print $row; }
Reading all the line at once:
my @rows = oopen('filename')->readall;
Reading all the lines into a single scalar:
my $rows = oopen('filename')->slurp;
This module is based on the File::Open module of Lukas Mai.
Gabor Szabo <gabor@szabgab.com>
<gabor@szabgab.com>
Copyright 2011 Gabor Szabo.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install File::Open::OOP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::Open::OOP
CPAN shell
perl -MCPAN -e shell install File::Open::OOP
For more information on module installation, please visit the detailed CPAN module installation guide.