in reply to Format _top

I don't see $^ ($FORMAT_TOP_NAME) defined anywhere, so the header doesn't seem to have been defined before you started printing.

For that matter, I don't see a number of subroutines you call, so for all I know you're resetting formatting variables to 0 or null.

What you should try to do is produce the minimal program that causes your problem. You can write out a constant string rather than producing real data. But a minimal program will help you (and us) identify the problem.

Replies are listed 'Best First'.
Re^2: Format _top
by patmcl (Novice) on Apr 30, 2008 at 14:54 UTC
    OUTF_TOP (file name with _TOP) is the default. I tried to declaring it with $^ it didn't help. I put all my file control in this loop to minimize the confusion with multiple files. All my subroutines use write and I only change $~ for the format. I had some "print" statements and changed $- but I removed all the print statements to insure they were not creating the problem. I will try and strip down the program and reproduce the problem...
      The point I'm trying to make is that I didn't know that was the default. Neither did I know it existed or was set or was defined. (I assume it's a valid format?)
      I tried to declaring it with $^ it didn't help.

      I don't understand. If you didn't populate the parameter, of course you won't see a header. Was a compilation error produced? If so, what was it?

      The minimum program just involving the format definitions, the setting of parameters, etc. (as well as use strict and use warnings) will give you a proof of concept, an easier situation to debug.