File::SimpleQuery is Perl module to query flat-files, simply!
SYNOPSIS
Have you ever wanted to make queries against a flat-file, similar to a database, but did not want to setup all the necessary database machinery? Enter File::SimpleQuery, which is intended to allow you to make simple sql-like queries against a file you specify.
Intended to make querying simple files easier. The file in question is expected to have the first row be a header row, which is how it knows whichs fields to select from.
use File::SimpleQuery;
my $delimiter = ',';
my $filename = 'test_file';
my $q = File::SimpleQuery->new($filename, $delimiter);
my @results = $q->select(
[ qw/ field1 fieldn / ],
sub { my $fields = shift; return 1 if $fields->{field1} eq 'foo' },
);
Product's homepage
Requirements:
· Perl