F
Frostillicus
I'm having trouble getting a regex to evaluate to true, even though it looks
plainly obvious to me that it should be. Here's what I'm doing...
print "find=" . $form{'find'} . ";name=" . $hashref->{'name'};
This line of code prints the following for an example set of data...
find=ant;name=The Ant's Pants.
Here's the code...
my $temp = $hashref->{'name'};
if ($form{'find'} =~ /$temp/i) {
print "Found record!";
}
You might say that I shouldn't need to stuff the hashref into a $temp
variable, but I did that in desperation in case some bizarre problem has
preventing me from matching on a value inside a reference to a hash.
plainly obvious to me that it should be. Here's what I'm doing...
print "find=" . $form{'find'} . ";name=" . $hashref->{'name'};
This line of code prints the following for an example set of data...
find=ant;name=The Ant's Pants.
Here's the code...
my $temp = $hashref->{'name'};
if ($form{'find'} =~ /$temp/i) {
print "Found record!";
}
You might say that I shouldn't need to stuff the hashref into a $temp
variable, but I did that in desperation in case some bizarre problem has
preventing me from matching on a value inside a reference to a hash.