我给 $second 变量为: E:\oracle\V44\EBSapps\appl\admin\adalldefaults.txt<br/>
两个字符串都相同,但通过该运算符,它们不匹配。为什么?
my $first="E:\\oracle\\V44\\EBSapps\\appl\\admin\\adalldefaults.txt";
chomp(my $second=<STDIN>);
print "$first\n";
print "$second\n";
print length($first);print "\n";
print length($second);print "\n";
if ($first !~ /$second/i)
{
print "string didn't matched\n";
}
else
{
print "string matched\n";
}