Thank you for the feedback.
(Are only germans interested in this kind of stuff?)
I think most usages in perl just don't make sense in ruby,
normally it is better to use a local variable, you also have no trouble
to put file handles in a variable in ruby.
It might be useful for the predefined global variables, like
$/   input record separator
$\   output record separator
The perl cookbook mentions also it is possible to use it for temporary
signal handlers, like this (perl code)
local $SIG(INT) = 'IGNORE';
I never needed to install a signal handler at all, so I'm not sure
if this something intersting, and if it apply to ruby.


The exception hint is very good, because  I think such a local
function is only useful if the control flow is quite complex.
Otherwise it easier just to save the var and restore it later.

It is true that we have problems if we are dealing with threads,
but I think if you are using threads and manipulate globals at the same 
time, you have trouble anyway. The code is correct in the sense that
the global has temporarly a new variable, so all called methods sees
this new value, and also all other threads see this variable.
but it might not be what you expected.

Karsten Meier