Gopu Akraju wrote:I tried in oerl but due to extensive search it is taking quite a long time
This sounds like a non-trivial operation and with thousands of records, is bound to take a lot of time. I don't think shell scripts are faster than perl, especially for this kind of operation which is not well-suited for scripting. You may gain some speed with Java or C, but probably not much (speculation on my part).
Maybe if you showed us your perl, we could help you tweak it (well, maybe someone else. I'm not a perl guy).