Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Can't use string ("main::STDOUT") as a symbol ref while "strict refs" in use

by Mr. Muskrat (Canon)
on Aug 26, 2012 at 17:50 UTC ( #989856=note: print w/replies, xml ) Need Help??


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;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://989856]
help
Chatterbox?
LanX 4 kids and wanting to upgrade to 5? wow! ! !
[1nickt]: My lads are 15 and 31 now and both drive me just as crazy as when little, just less frequently.
[LanX]: ;p
[marto]: LanX I'd rather commit sudoku :P
[marto]: trench humour folks, feeling rough.
[marto]: there is never a night when they sleep all the way through, but last night was something else
[marto]: gave in at 3:45 ish and let Charlie watch videos about spitfires, the battle of Britain. He's plane crazy
[1nickt]: marto soothing!

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2017-11-18 18:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (277 votes). Check out past polls.

    Notices?