hello all Assume the foll $string='mail.com'; @array=qw(mail.com one.mail.com two.mail.com mail.com/one mail1.com); @match = grep{..}@array; I want to match all that *contain* $string but is not equal to $string so I came up with @match = grep{/^$string.+/ || /.+$string$/} @array; is there any better way Thanks RamThread Next