in reply to join on 6 huge files
Man, flashbacks to my CS prof talking about the good ol' days of magtapes (of course I've got a couple of 9-track reels somewhere in a box in the garage so I can't really talk).
At any rate, as has been said there's nothing wrong with having several files open. You're just doing the last phase of a merge sort with six inputs (since you've guaranteed the inputs are already sorted). Just maintain a list of [ $filehandle, $next_token ] pairs and pull off the smallest (and replace it from the handle or remove the pair from the list when the handle hits EOF).
|
|---|