#! /usr/bin/perl my $url=""; my $str="dog"; my @f=("dog",""); if(grep{/$url/}@f){print "Match!!\n";} else {print "No match\n";}