On 01/02/2014 12:33 PM, David Precious wrote:
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 :)
who is your tuit supplier? i am looking for a better and cheaper one.
uri
--
Uri Guttman - The Perl Hunter
The Best Perl Jobs, The Best Perl Hackers
http://PerlHunter.com
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/