I'm new to perl and I'm writing a script to parse multiple Gaussian03 output files and extract certain pieces of data from them.
Ideally the script needs to print out the name of each file, look for (the last) SCF Energy, the Zero-point Energy and check if the job has converged (i.e. in the file the word 'YES' will appear with some other text on four consecutive lines).
So far the script prints out the filenames and the words "Energy =" and "Zero-point energy =" but without the values it is meant to insert. I've tested this with another script and it does print out the correct values, so I'm not sure why it's not working here.
Any help would be greatly appreciated.
Here is what I've been able to write so far: