Hey, All,
Well, I am stumped. I am trying to get a set of formats working in a script. I want to have a header (_TOP) and then the body. Well, I can not even get the header working correctly.
Here is what I started with(with lots of calculation missing):
open (TMP_OUT_FILE, ">optimize_report.tmp") || die("File is not open");
write;
format TMP_FILE_OUT =
Simulation Measurement(s) data:
| SIM1 Measurement | SIM2 Measurement | Difference |
+------------------+------------------+--------------+
.
This writes to STDOUT just fine. Now, when I change write to write to the filehandle (write(TMP_OUT_FILE)
, I get the following error:
Undefined format "TMP_OUT_FILE" called at ./opt_capChar_ratio line 158
I have tried several different things including changing the format name to TMP_OUT_FILE_TOP. I tried setting $~ = TMP_OUT_FILE_TOP and $~ = TMP_OUT_FILE. This one has really got me stumped!!
Any help with this would be appreciated.
Thanks,
Dale
Perl Version Info: This is perl, v5.8.5 built for x86_64-linux-thread-multi
Well, I am stumped. I am trying to get a set of formats working in a script. I want to have a header (_TOP) and then the body. Well, I can not even get the header working correctly.
Here is what I started with(with lots of calculation missing):
open (TMP_OUT_FILE, ">optimize_report.tmp") || die("File is not open");
write;
format TMP_FILE_OUT =
Simulation Measurement(s) data:
| SIM1 Measurement | SIM2 Measurement | Difference |
+------------------+------------------+--------------+
.
This writes to STDOUT just fine. Now, when I change write to write to the filehandle (write(TMP_OUT_FILE)
Undefined format "TMP_OUT_FILE" called at ./opt_capChar_ratio line 158
I have tried several different things including changing the format name to TMP_OUT_FILE_TOP. I tried setting $~ = TMP_OUT_FILE_TOP and $~ = TMP_OUT_FILE. This one has really got me stumped!!
Any help with this would be appreciated.
Thanks,
Dale
Perl Version Info: This is perl, v5.8.5 built for x86_64-linux-thread-multi