Ask a Question related to PERL Beginners, Design and Development.
-
Siva Sai #1
indexing flat files
Hi,
I have a file (about 3-4 MB ) with about 20000 records
in it. I need to create an index on a particular field
(integer ) in each record. But there might be multiple
records matching a particular field value. My queries
are something like,
"Get all records with the A < field value < B"
This looks like an ideal candidate for a DBMS solution
like MySQL but I do not have it. Is there any way I
could do this efficiently in Perl. Will the DB_File
module be usefull( I know very little about this ).
Can anyone please help?
Thnx.
Siva.
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
[url]http://sitebuilder.yahoo.com[/url]
Siva Sai Guest
-
Verity errors when indexing PDF files
We have problems indexing pdf files and the sysinfo.log reports 100reds of messages like the following: Error E0-1514 (Drvr): Locale:locuni: Locale... -
Temporary Flat Files
I have an ASP 3 application that I am converting to and improving with ASP.NET. This application creates two temporary flat files and appends them... -
indexing html files with php
Hello all, this must be something that a lot of people have been looking for, and probably found solutions for, but i can't seem to find anything... -
DB2 and Flat files
Hi, I'm new in DB2. Can anyone tell me whether there is any command in DB2 to batch update the contents of a flat file into a DB2 table. ... -
How to create .deb of flat files?
Hi All! I've got a handful of regular flat text files that I would like to make into a .deb but I'm not familiar with doing anything that doesn't... -
Awards #2
Re: indexing flat files
Hi,
this is just an Idea and maybe it is the worst idea for what you want. But I
'll go for it :-)
What I would do-- I have an Index(sorted)
Then the main file with the 20,000 records would be a DBM just a tied or
dynamic or a hashed text.
using the module
SDBM_File, POSIX modules
And the index would be the address or Key of the record in a main file.
like in the index sorted by integers
you would have
YOUR INTEGER | ADDRESS or key
where Address would be the row in the main file.
when you create the 'tied' file, you can have a counter.
foreach $line(@data){
$c++;
($int, $othervalue)=split(/\|/,$line);
$dbm{$c}= $line;
push @tobegotoindex, "$int|$c\n";
}
just an idea.
That is what I used to do with Visual Basic.
awards
Awards Guest



Reply With Quote

