Re: usage of do {}



On 6/30/05, Peter Rabbitson <rabbit@xxxxxxxxx> wrote:
> Here and there on the web I encounter claims that the do {} operator is
> depreciated. However I find it convenient to do things like:
>
> eval { some stuff } or do { some multiline error handling };
>
> is this a bad practice?

No, that's not bad practice IMO. It evidently works for you, and I
think it's clear enough what's going on with that code. For the sake
of code reuse, though, you might want to consider generalizing the
code and sticking it into a module.
.