in reply to Re: YAlQ: Yet Another local() Question.
in thread YAlQ: Yet Another local() Question.
is illegal, even though the -concept-, if not that particular example, is useful.{ my $fh; sub init_print_log { $fh = shift;} sub print_log { print $fh scalar localtime,@_;} sub print_log_altfile { local $fh = shift; print_log(@_);} }
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
My vs. YAlQ: Yet Another local() Question.
by chip (Curate) on Aug 04, 2000 at 06:38 UTC |