I have used this approach numerous times (though after I discovered File::Copy I've used it much more). The only thing I missed (typical of my not seeing all the power one can get into a single line) is the 'print NEW while(<OLD>)' single line.
I am curious that in the original Anonymous Monk's code the input from OLD is to a scalar, doesn't that just read in a single record from the OLD document?
In reply to Re^2: How to copy a file
by ack
in thread How to copy a file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |