On Thu, 02 Jan 2014 12:19:16 -0500 Uri Guttman <u...@stemsystems.com> wrote: > On 01/02/2014 12:08 PM, David Precious wrote: > > Oh, I was thinking of a wrapper that would: > > > > (a) open a new temp file > > (b) iterate over the source file, line-by-line, calling the provided > > coderef for each line > > (c) write $_ (potentially modified by the coderef) to the temp file > > (d) finally, rename the temp file over the source file
[...] > it wouldn't be a bad addition to file::slurp. call it something like > edit_file_loop. if you write it, i will add it to the module. you can > likely steal the code from edit_file_lines and modify that. i would > document it as an alternative to edit_file_lines for very large files. > > it will need pod, test files and good comments for me to add it. > credit will be given :) Righto - I'll add it to my list of things awaiting tuit resupply :) -- David Precious ("bigpresh") <dav...@preshweb.co.uk> http://www.preshweb.co.uk/ www.preshweb.co.uk/twitter www.preshweb.co.uk/linkedin www.preshweb.co.uk/facebook www.preshweb.co.uk/cpan www.preshweb.co.uk/github -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/