|
Ken
Here is how I would do it:
Read your entire NUT.DAT file into an
array. - This is your 'Smaller' File
Join it with a space delimiter so in
memory it looks like:
Must use a delimiter to keep 11-byte groups
from running together.
"12345678912 56789876543 23456789652 .."
Then read each line in your
database DATA.DAT file and:
TODO: Maybe do a test to see if split is faster than
$DATA =
"">
#
maybe ($DATA, $junk) = split( / /, $input, 2); is faster?
Use favorite Regex to Look for
$DATA anywhere in your Joined "NUT_DAT" string.
if it is >= 0 then save that Source line
to BOX.DAT
you might also want to count the matched
records.
close files
This will be immensely faster
than 'Brute force' method.
Hope this solves your
problem.
Gregg Morrison
( [EMAIL PROTECTED]
)
|
Title: File Comparison
- File Comparison Kenneth Jideofor [ MTN - Ikoyi ]
- Re: File Comparis... $Bill Luebkert
- RE: File Comparis... Gregg Morrison
- RE: File Comparis... Wagner, David --- Senior Programmer Analyst --- WGO
- RE: File Comparis... Hemphill, Barry
