Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Inplace without backup uses no extra disk space?

by ikegami (Pope)
on Feb 02, 2010 at 16:01 UTC ( #820968=note: print w/replies, xml ) Need Help??


in reply to Inplace without backup uses no extra disk space?

I presume that sed -i does the following:

  1. Rename the original file
  2. Create a new file with the same name as the original
  3. Delete the original file

perl -i does the same thing. If you say that sed uses a temp file, then so does perl. The only difference is that Perl makes the original anonymous instead of adding some suffix.

Windows doesn't support anonymous files, which is why you need to specify a suffix on Windows.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2019-12-05 20:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (151 votes). Check out past polls.

    Notices?