Hi All,
 
Using a pattern I encountered behavior I didn't expect, as follows:
 
my $ABC = "abc";
$_ = $ABC;
print "\$ABC     " . (/^$ABC$/? "matches" : "does not match") . " \"$ABC\"\n";    # Matches
 
my $ABC_DEF = "abc\\def";
$_ = $ABC_DEF;
print "\$ABC_DEF " . (/^$ABC_DEF$/? "matches" : "does not match") . " \"$ABC_DEF\"\n"; # Doesn't match
print "abc\\def  " . (/^abc\\def$/? "matches" : "does not match") . " \"abc\\def\"\n"; # Matches
 
If $ABC_DE's content is further interpreted, as seems to be the case, how do I stop it?
 
TIA,
Richard

Reply via email to