while () { next unless ( m:(.+?)#(\d+)$: ); if ( exists( $pathname_versions{$1} )) { #pathname exists in list1 # compare the versions of the matching pathnames ,if the version is lower in list2 print the #pathnames with both versions.Eg //depot/asic/tools/perl/scripts/examples/modem.c#7-> 6. #Basically this block should find all the lower version pathnames in list2 compared to list1 if ( exists( $pathname_versions{$1}{$2} )) { # we have a match on version# as well, so... #just print "duplicate file found" with the pathname and version #Eg.//depot/asic/tools/perl/files/examples/fpower.cpp#2 } else { # version number wasn't seen in list1, so... #this case hardly araises,there will always be a version# associated #we can just print "No version number" } } else { #working on logic what if the pathnames doesn't match } }