in reply to lookup/duplicate check in perl

Welcome to the monastery!

You are asking a question about a subroutine "check_dup_rec", and have not shows us what it contains.

Without that , we will be unable to assist.

Please post code, using <code/> tags, as AnomalousMonk has suggested.

        Software efficiency halves every 18 months, thus compensating for Moore's Law.