Thanks a ton. Can't imagine the feeling of having a reply from the great Merlyn.
As always ur code is not only faster but neat and nice as well. However, my code doesn't go the O(n square) way, since i make atmost n comparisons (as the files are sorted first) i keep emptying the @temp array if u noticed.
thanks again though.