use strict; use warnings; my $str = "testing\\"; print "matched!" if $str =~ /\\$/;