Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://975223]
help
Chatterbox?
[erix]: balloonist, surely :P (or maybe baloneyist)
[marto]: afternoon all
[Corion]: Hi marto ;)
[Corion]: Eily: Yeah - my French isn't even good to understand jokes, much less to make them :-D
[Corion]: marto: That post is a repost/duplicate of Excel sheet data write issue :-D
[Corion]: Whoops - Merging worksheets in .xls in one Excel sheet
[marto]: Corion, whoops, can the moderation me amended?
[Corion]: marto: We could vote, unconsider and reconsider ;)
[Corion]: "vote keep", I meant ;)
[Corion]: marto: But that aside, I hope you are well!

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2017-09-21 14:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (248 votes). Check out past polls.

    Notices?