Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: data manipulation

by BillKSmith (Monsignor)
on Feb 28, 2021 at 21:27 UTC ( #11128919=note: print w/replies, xml ) Need Help??

in reply to data manipulation

It really is not possible to overwrite data in file. You must replace the file with edited version of itself. (This would be true of any language) The perl runtime flags /p and /i should be a big help in doing this.

Process the file one line at a time.

  • If the current line is a 'Parameters' line, extract the vector into a global array.
  • Else if it is a 'Name' line, extract the block number into a global scalar.
  • Else if it is a 'LowerLimit' line, update the value. (use $vector[$block])
  • Else if it is a 'UpperLimit' line, update the value.
  • Else do nothing

If you still have problems, post explicit questions.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2022-05-25 17:44 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (90 votes). Check out past polls.