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

Re-runnably editing a file in place

by eyepopslikeamosquito (Archbishop)
on May 22, 2003 at 09:06 UTC ( [id://260011]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # Slurp file $fname into array @lines.
    open(my $fh, $fname) or die "open '$fname': $!";
    ...
       rename($bak, $fname) or die "rename $bak $fname: $!";
       chmod($mode, $fname) or die "chmod $fname: $!";
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://260011]
Approved by Tanalis
Front-paged by Coplan
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-24 23:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found