Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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?
[choroba]: Good morning!
[choroba]: Still no ambrus?
[karlgoethebier]: good morning!

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2017-06-26 08:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (573 votes). Check out past polls.