in reply to variable comparison
$file="filename.txt"; $ext=".txt"; if ($file =~ /$ext$/){ print "match\n"} else {print "nomatch\n"}
In Section
Seekers of Perl Wisdom
in reply to variable comparison
$file="filename.txt"; $ext=".txt"; if ($file =~ /$ext$/){ print "match\n"} else {print "nomatch\n"}