in reply to Re^2: Interpolation of file handles in print
in thread Interpolation of file handles in print
Sometimes, you have to tell perl that you really do know what you're doing, and that it's not a mistake. You don't want to shut off warnings or strict for the whole program, but if there's a specific section that perl complains about, that is what you want, you can do something like the following:
{ no strict qw(refs subs); print { $OK ? STDOUT : STDERR } "stuff\n"; }
|
|---|