while ($allChanges->[$k]) { $logger->info("Change $k was to the ", $allChanges->[$k]->getField(), " field of testCase ", $allChanges->[$k]->getKey(), " on createdDate ", $allChanges->[$k]->printCreatedDate(), " Old String = (", $allChanges->[$k]->getOldString(), ") New String = ", $allChanges->[$k]->getNewString()); local $oldString = $allChanges->[$k]->getOldString(); local $newString = $allChanges->[$k]->getNewString(); $logger->debug("oldString = (", $oldString, ")"); $logger->debug("newString = (", $newString, ")"); print Dumper($oldString); if ($oldString eq "Automated") { # Line 103, the one that gives all the trouble. $logger->debug("old string = Automated: ", $oldString); $logger->debug("new string: ", $newString); } } package ChangeItem; sub new { my $class = shift; my $logger = get_logger("ChangeItem"); my $self = { } ; if (@_) { $self->{line} = shift @_; } $self->{key} = 0; $self->{field} = 0; $self->{oldString} = 0; $self->{newString} = 0; $self->{createdDate} = 0; $self->{version} = 0; bless ($self, $class); return $self; } sub setOldString { my $self = shift; $self->{oldString} = shift; } sub getOldString { my $self = shift; return $self->{oldString}; } #### INFO main:::80: Change 0 was to the Automated field of testCase HIREX-16861 on createdDate 2013-05-13 10:16:05 Old String = (To Be Automated) New String = Ready For Integration DEBUG main:::84: oldString = (To Be Automated) DEBUG main:::85: newString = (Ready For Integration) $VAR1 = 'To Be Automated'; Use of uninitialized value in pattern match (m//) at weeklyAutomationChanges.pl line 103. Use of uninitialized value in pattern match (m//) at weeklyAutomationChanges.pl line 103.