http://www.perlmonks.org?node_id=372261


in reply to Re: Bad news for IO::Handle magic (SWYM or sink)
in thread Bad news for IO::Handle magic

While my examples always used STDIN, that was for brevity. Any code can play tricks on you if you use the Module->sub() OO syntax.
$ perl -MCGI -le 'select(select(CGI)); print CGI->new' Can't locate object method "new" via package "IO::Handle" at -e line 1 +.
This isn't limited to all-caps names, either:
perl -MFile::Spec -le 'select(select(File::Spec)); print File::Spec->r +ootdir' Can't locate object method "rootdir" via package "IO::Handle" at -e li +ne 1.
--Stevie-O
$"=$,,$_=q>|\p4<6 8p<M/_|<('=> .q>.<4-KI<l|2$<6%s!<qn#F<>;$, .=pack'N*',"@{[unpack'C*',$_] }"for split/</;$_=$,,y[A-Z a-z] {}cd;print lc