|Think about Loose Coupling|
Question on using format and writeby Popcorn Dave (Abbot)
|on Dec 13, 2002 at 19:41 UTC||Need Help??|
Popcorn Dave has asked for the wisdom of the Perl Monks concerning the following question:
For the first time in my Perl programming, I've had to use formats. Up until now I haven't had a need to use them.
I've gone through the docs, and the Perl Black Book, but I'm not getting output from my data. Well I sort of am, but it's all 0.00 and blanks for the name - not exactly what I want.
My format code is:
and the code producing the data is:
but I've done something wrong as I'm not getting values out. I've confirmed that I do have vaild data using print statements, so I believe I've narrowed it down to a problem with my format statement.
My other question is if I can just use the foreach function to pass the variables directly to the write function or do I need to assign each one as I tried to do.
Thanks in advance for any help with this!
There is no emoticon for what I'm feeling now.