Ah, that would also explain why there is the IMHO arbitrary restriction that you can only localize global variables, and not lexical ones. Why something like:
{ my $fh;
sub init_print_log { $fh = shift;}
sub print_log { print $fh scalar localtime,@_;}
sub print_log_altfile { local $fh = shift; print_log(@_);}
}
is illegal, even though the -concept-, if not that particular example, is useful.
UPDATE: Yes, save() would be a better name... better than some of the others that have been suggested. Someone also suggested renaming my() to local(). I hope that one doesn't fly.