var str = "I am a string"; if (str =~ /string$/) { print "Ends with 'string'\n"; }