In article <uE027.74514$2u2.1625755 / e420r-sjo2.usenetserver.com>, "Dave
Thomas" <Dave / pragmaticprogrammer.com> wrote:

>   f = File.open("wombat", File::APPEND, 0600)
> 
> will do the same

I knew that, of course ... I needed to, in order to get the perl hack working :-).

> In general, translating Cookbook stuff to Ruby is quite difficult,
> because the organization of the cookbook is to some extent oriented
> around the Perl way of doing stuff

Agreed.  As I said in my response to Jos Backus's comment, below, I'm
treating this as a way to learn more about Ruby.

What I'm trying to do is write what I think is the right way to do those
things in Ruby, particularly where there's a neater, more efficient, or
clearer method.

However, where it looks like it could be interesting to try, and may show
off some Ruby features, I'm implementing the perl feature.

> For an example, have a look at the
> slide starting at
> 
>   http://www.pragmaticprogrammer.com/talks/perlmongers/img45.htm

Yes.  That's an excellent example of what I'd like to see in the
cookbook.  If only you had the time to do that for every example, we'd
end up with a brilliant book !!

The reason I mentioned the PLEAC project was in the hopes that some other
people on this list, particularly people like yourself, matz etc., might get
involved directly in the project and hence we'd end up with a much better
product, even if each person only wrote one recipe.

I haven't discussed it with the other chap who originally started the
Ruby effort on PLEAC, but I think the next best thing would be for us to
publish snippets of our code here to get comments, cleanups and
extensions.

Whatever happens, the attempt to write all this code should help me to
improve my knowledge of ruby immensely.  I'll definitely try not to end
up just writing perl in ruby, though :-).