in reply to Help needed with file output and hashes.

The reason your header code is being ignored is because you are overwriting it. You open the file, write the header then close it, then later reopen the file using ">$file" which effectively erases it's contents, when you write the rest of you content. Use ">>$file" instead.

For the uninitialised error, I can only guess that you have lines in your input file that contain '#CCR-' that are not followed by anything. Hence you regex fails to capture anything into $functionName and your attempt to use it as a hash key in the line  $functxt{$functionName} = $desc;, results in the warning. An inspection of the input file, or testing for and warning of (and perhaps skipping), lines that do not result in a capture would be the surest way to test that hypothesis.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.