perlpal has asked for the wisdom of the Perl Monks concerning the following question:
I need to print text to a file. The catch being that some part of the text is static(hardcoded) whereas the rest is dynamic(defined after some processing logic.)
The whole file can be written to sequentially i.e
print static text
print static text
print dynamic text
print static text
print dynamic text
and so on ..
Or the file can be written as
print all static text first
print dynamic text
In the second approach , the dynamic text needs to be inserted into different placeholders between different static text. Is this a better approach ? Can the same file handle be used for this?
Thanks in advance!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File dynamic write operations
by moritz (Cardinal) on Aug 13, 2010 at 12:55 UTC | |
|
Re: File dynamic write operations
by jethro (Monsignor) on Aug 13, 2010 at 13:04 UTC | |
|
Re: File dynamic write operations
by Marshall (Canon) on Aug 15, 2010 at 07:07 UTC | |
by perlpal (Scribe) on Aug 16, 2010 at 09:28 UTC | |
by Marshall (Canon) on Aug 17, 2010 at 16:19 UTC |