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

Re: Rewriting into file

by Anonymous Monk
on Jun 20, 2011 at 06:40 UTC ( [id://910505]=note: print w/replies, xml ) Need Help??


in reply to Rewriting into file

Can anyone of you guide me?

What is it that you're really trying to accomplish?

If you're trying to get the job done, editing a file is fours steps

  • read original-file
  • modify data
  • write new-file
  • rename new-file to original-file
If on the other hand this is a homework assignment, read open, Tie::File, and most important, ask your teacher what you're supposed to learn from this exercise; you're cheating yourself by asking us.

Replies are listed 'Best First'.
Re^2: Rewriting into file
by pr09 (Novice) on Jun 20, 2011 at 08:05 UTC
    Hello, No this is not an homework assignment.I know that we can write to a new file,but i was just wondering if we can rewrite into the same file and just replace that particular value.
      Hello, No this is not an homework assignment.I know that we can write to a new file,but i was just wondering if we can rewrite into the same file and just replace that particular value.

      A take-home-test is an homework assignment.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-19 13:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found