in reply to Using less memory with BIG files
I don't see any "make a database" in there. Do you mean you want to use two existing files as a database, using one as a key column for example? Or do you mean that you want to take the data from two existing files and generate a database from them? Or maybe you mean something else?
In any case, we can probably help you more if you show us just a little more of the code, especially the output part. Even just making clear what you want to achieve end to end would help a lot.
As an aside, don't use our, it's not doing what you think or what you want. Use my instead. $acnumbers and @list should be defined (using my) inside the for loop - the undef is not needed then.
It may be that your code does show the output you really want (I missed the possibility due to using select instead of print $outFile ...). BTW, did I mention you should always use three parameter open and lexical file handles? You should!
In any case if you want a database use one - I'd suggest SQLite in this sort of context.