Fair enough, it's a string compare rather than a pattern match. It's a simple eq, which should compare the string contained in $oldString to the value in quotes. Still, I get that uninitialized value error. The reason that there's a big gap between line 84 and line 103 is that I have a chunk commented out with an =item =cut block. Perhaps this will help. I've removed that block to make sure it wasn't causing the problem.
80 my $oldString = $allChanges->[$k]->getOldString();
81 my $newString = $allChanges->[$k]->getNewString();
82 $logger->debug("oldString = (", $oldString, ")");
83 $logger->debug("newString = (", $newString, ")");
84 print Dumper($oldString);
85 sleep 1;
86
87 if ($oldString eq "Automated") {
88 $logger->debug("old string = ", $oldString);
89 $logger->debug("new string = ", $newString);
90 }
Output:
INFO main:::78: Change 2 was to the Automated field of testCase HIREX-
+16845 on createdDate 2013-05-13 11:34:52 Old String = (Ready For Inte
+gration) New String = Automated
DEBUG main:::82: oldString = (Ready For Integration)
DEBUG main:::83: newString = (Automated)
$VAR1 = 'Ready For Integration';
Use of uninitialized value in pattern match (m//) at weeklyAutomationC
+hanges.pl line 87.
Use of uninitialized value in pattern match (m//) at weeklyAutomationC
+hanges.pl line 87.
DEBUG main:::352: old string = Ready For Integration
DEBUG main:::353: new string = Automated
DEBUG main:::355: New string = Automated
-Logan
"What do I want? I'm an American. I want more."