Modified" #### ### The final result of this should be the string "Modified" from the example line given above... for (my $x = 0; $x <= $#reportData; $x++) { if ($reportData[$x] =~ /^(\s+)(\)/) { (my $changeType) = $reportData[$x] =~ /\>[A-z]+\[A-z]+\[A-z]+\[A-z]+\