in reply to Re^2: comparing file contents
in thread comparing file contents
Yes, it could be achieved by opening the file in read+write mode, or by re-opening the file in write mode after its read-only filehandle was closed. However, either of these methods would require other code changes, to hold all the lines of output until after all the input had occurred.
The simplest way is to append this code to the bottom of my previous code:
unlink $in_path or die "Could not delete '$in_path': $!"; use File::Copy; move( $out_path, $in_path ) or die "Could not move file '$out_path' to '$in_path': $!";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: comparing file contents
by kumaar1986 (Initiate) on Nov 26, 2011 at 16:01 UTC | |
by Anonymous Monk on Nov 26, 2011 at 16:46 UTC | |
by kumaar1986 (Initiate) on Nov 28, 2011 at 00:56 UTC |
In Section
Seekers of Perl Wisdom