Meta::Utils::Text::Counter - counter number of regexp matches in a file.
Copyright (C) 2001, 2002 Mark Veltzer; All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
MANIFEST: Counter.pm PROJECT: meta VERSION: 0.02
package foo; use Meta::Utils::Text::Counter qw(); my($number_of_games)=Meta::Utils::Text::Counter::count("mypgnfile.pgn","Event");
This module helps you to quickly count the number of appearances of a certain regexp in a certain file.
count($$) TEST($)
This method receives: 1. file - file to grep in. 2. regexp - regexp to look for.
A test suite for this module. The idea is to count number of games in a GNU pgn game.
None.
Name: Mark Veltzer Email: mailto:veltzer@cpan.org WWW: http://www.veltzer.org CPAN id: VELTZER
0.00 MV web site automation 0.01 MV SEE ALSO section fix 0.02 MV md5 issues
Meta::Baseline::Aegis(3), Meta::Utils::Output(3), Meta::Utils::Parse::Text(3), strict(3)
Nothing.
To install Meta::Init, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Meta::Init
CPAN shell
perl -MCPAN -e shell install Meta::Init
For more information on module installation, please visit the detailed CPAN module installation guide.