On Tue, Aug 19, 2003 at 11:31:16AM +0000, Martin Bower wrote: > %hash1 contains values such as "111.666.fff.jjj.ccc.222" > %hash2 contains values such as "111.666.fff.___.ccc.222" (where the ___ > can eixst in any position)
If there is only ever one "___" in a value you could generate all 6 possibilities from hash1 and look them up directly in hash2. if ($hash2{'___.666.fff.jjj.ccc.222'} or $hash2{'111.___.fff.jjj.ccc.222'} or $hash2{'111.666.___.jjj.ccc.222'} or $hash2{'111.666.fff.___.ccc.222'} or $hash2{'111.666.fff.jjj.___.222'} or $hash2{'111.666.fff.jjj.ccc.___'} ){ warn "found it!" }