For example,
First, I get the dataRecord into an array like this,
my @dataRecord = split(/\n/);
Next, I filter on the array data record to get the test lines like this,
@dataRecord = grep(/test_names/,@dataRecord);
Next, I need to get the test names from the test line like this,
my ($test1_name,$test2_name,$test3_name) = getTestName(@dataRecord);
sub getTestName
{
my $str = shift @_;
# testing the str for data and
print str,"\n"; # This test point works in that I see the whole test line.
$str =~ m{/^test1 (.*), test2 (.*), test3 (.)/};
print $1, "\n"; # This test point does not work.
return ($1,$2,$3);
}
Is there a better way for me to acommplish this task?