|Do you know where your variables are?|
Re^3: Regular Expression to Parse Data from a PDFby kcott (Bishop)
|on Feb 28, 2020 at 06:28 UTC||Need Help??|
'They might add a "R-1" or "R-2" to the far left column if there is a revision.'
You just need to extend the regex to handle that. Here's an example:
print ... $fields . ",". $fields . ",". $fields . ",". ...
Here's an example to show a better way to handle that:
On an unrelated note, there are problems with your open statements. Use of package variables can lead to all sorts of bugs that are hard to track down. Your six error messages are identical: how will you know which file generates "Can't open the output file ...". Look to using lexical filehandles and the 3-argument form of open. Consider the autodie pragma — you'll do less work and get better error reporting.