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.

there is a test script t/edit_file.t and i am looking for more
tests. stuff that edits binary and utf files would be great. you can use
the binmode option (which was recently improved to handle all binmode
values) on those calls (it affects both reading and writing the file).

also there are two new options. read_file now has a chomp option which
(of course) chomps lines when reading in lines. and read_dir has prefix
which puts the dir path you opened before each entry it reads from the
dir. with that you can directly use the results to open files in a dir.

as with other releases, any test runs you can do on different platforms
and perl versions would be helpful.

thanx,

uri

-- 
Uri Guttman  ------  [email protected]  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

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

Reply via email to