Hey guys.. one more quick question and I promise I will leave you alone for a bit
Essentially all I want to do is match the string "5.1.1".
However I have noticed that PERL treats the '.' as a special character and '\.' doesn't seem to change it. The following code gets a match for "5.1.1" and "58131". So, how do I get 5.1.1 to only match 5.1.1 and not 58131?
Code:
@testArray = ("5\.1\.1",);
$testme = "58131";
$currentThing = $testArray[0];
if($testme =~ /$currentThing/i)
{
print "It Matches!\n";
}
else
{
print "No Match!\n";
}
Thank you so much for your help, again.
Essentially all I want to do is match the string "5.1.1".
However I have noticed that PERL treats the '.' as a special character and '\.' doesn't seem to change it. The following code gets a match for "5.1.1" and "58131". So, how do I get 5.1.1 to only match 5.1.1 and not 58131?
Code:
@testArray = ("5\.1\.1",);
$testme = "58131";
$currentThing = $testArray[0];
if($testme =~ /$currentThing/i)
{
print "It Matches!\n";
}
else
{
print "No Match!\n";
}
Thank you so much for your help, again.