I have a branch_properties.txt file located in my $ENV{"buildPath"} which contains the string TEST_SEQUENCE=Basic or TEST_SEQUENCE=Extended.
I need to take the value after the TEST_SEQUENCE and put it in a variable .
sub GetValueForTestSequenceSplit {
my $filePath = $ENV{"buildPath"} . "\\" . "branch_properties.txt";
my $fileContent = "";
open(my $fileHandle, "<", $filePath)
or die("Cannot open '" . $filePath . "' for reading! " . $! . "!");
while (my $line = <$fileHandle>) {
chomp $line;
my @strings = $line =~ /sequence/;
foreach my $s (@strings) {
print $s;
}
}
close($fileHandle);
}
Where do I get wrong? The console line output in Jenkins shows nothing.
push @strings, $line =~ /sequence=(\w+)/ig;@stringsto contain?