Think about Loose Coupling | |
PerlMonks |
Re^2: Script fails to insert text and appends it towards the end of file.by always_coys (Novice) |
on Nov 21, 2020 at 14:53 UTC ( [id://11123976]=note: print w/replies, xml ) | Need Help?? |
Dear haukex Thanks a lot for the wonderful explanation. Adding recsep=>"\n" has solved my problem and this is enough, in the first pass (as I know the line numbers to insert the text, beforehand). However, eventually I intent to use the state machine pattern, or to overwrite the file in each iteration. Thank you for the pointers and for thinking way ahead of me! always_coys.
In Section
Seekers of Perl Wisdom
|
|