Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4: Moving data in a tree

by wade (Pilgrim)
on Jul 21, 2008 at 21:36 UTC ( #699159=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Moving data in a tree
in thread Moving data in a tree

In general, if I don't have a memory crisis, I'd:

  • read the whole file into a suitable data structure,
  • manipulate the data structure, and
  • write the data structure out to a new file.

That makes things easier to code and, since you have before and after files, easier to check.

--
Wade

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (13)
As of 2016-08-24 14:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (346 votes). Check out past polls.