Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Do you know where your variables are?
 
PerlMonks  

Re: modifying in the same file

by Illuminatus (Curate)
on Jun 08, 2012 at 19:04 UTC ( #975223=note: print w/ replies, xml ) Need Help??


in reply to modifying in the same file

zentara did indeed answer the question you asked, but it's probably not the question that you wanted to ask :) If you are really asking "how can I open the file, remove the comments, and then close it (ie not create an additional file)", the answer is that, in general, you can't. If you read the section on open he quoted, it tells you so. You can use perl -i, which says it modifies the file in place, but if you read the fine print, you'll see that it actually uses 2 files. There are ways to use just one file, but that is an exercise left to the user

fnord


Comment on Re: modifying in the same file

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2014-04-21 11:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (493 votes), past polls