#!perl local @match; open(FILE_EXPECTED_RESULT, "< gcov_report.txt"); while() { chomp($_); if ($_ ne "") { print $_ . "\n"; (@match) =($_ =~ /((.*\.c\s)|(.*\.h\s)|(.*\.cpp\s))|(\s+(.*)\%\s+(of)\s+\d+\s)|(\bNone\b)/g); print "title : ".$match[0]."\n"; print "percent2 : ".$match[1]."\n"; print "percent3 : ".$match[2]."\n"; } } close (FILE_EXPECTED_RESULT);