This has got to be obvious but I\'m just not seeing it.
I have a documents containing thousands of records just like below:
Row:1 DATA: [0]37755442 [
You need to use capturing parentheses to actually capture:
if ($record =~ /(Defect)/ ) { print "$1\n"; }