Hi Uri,

On Saturday 07 May 2011 07:31:28 Uri Guttman wrote:
> File::Slurp .17 beta is at:
> 
>       sysarch.com/File-Slurp-9999.17.tar.gz
> 
> this has a major new set of functions that should prove popular,
> edit_file and edit_file_lines. those both read a file into $_, call a
> code block and then write the file back out. edit_file reads the whole
> file into $_ and edit_file_lines reads each line into $_ and calls the
> code block for each line. they are equvilent to using -0777 -pi and -pi
> on the command line. you can the ability to edit a file with one simple
> call. see the pod for more info and examples.
> 

thanks for the new release. edit_file seems useful. I had thought of adding 
something similar to IO::All in the past.

Just a question - how well can read_file and their friends handle 
encodings/character-sets? Reading a file using 
binmode $fh, ":encoding(utf-8)" (or whatever) would be a major dealbreaker for 
me (and many other people), because I cannot assume that the data that a file 
reads is in 8-bit binary data. See:

http://www.joelonsoftware.com/articles/Unicode.html

Regards,

        Shlomi Fish ( שלומי פיש )

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
UNIX Fortune Cookies - http://www.shlomifish.org/humour/fortunes/

And the top story for today: wives live longer than husbands because they are
not married to women.
    -- Colin Mochrie in "Who's Line is it, Anyway?"

Please reply to list if it's a mailing list post - http://shlom.in/reply .

_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to