in reply to Can't use string ("main::STDOUT") as a symbol ref while "strict refs" in use
GlitchMr is correct however there is another way (this is Perl after all... TIMTOWTDI). Just disable strict refs.
perl -Mstrict -M-strict=refs -e "print {select()} 6" 6
Long version:
use strict; no strict 'refs' print {select()} 6;
|
|---|