Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to Re: Script fails to insert text and appends it towards the end of file.
in thread Script fails to insert text and appends it towards the end of file.

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.
  • Comment on Re^2: Script fails to insert text and appends it towards the end of file.
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11123976]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (None)
    As of 2024-04-25 00:55 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found