$file="filename.txt"; $ext=".txt"; if ($file =~ /$ext$/){ print "match\n"} else {print "nomatch\n"} [download]
In reply to Re: variable comparison by perlcgi in thread variable comparison by Anonymous Monk