John M. Dlugosz has asked for the wisdom of the Perl Monks concerning the following question:
I was suprised to find the following
choked, complaing that $SH was not a reference to a glob.my $string; my $SH= new IO::Scalar; $SH->open (\$string); select ($SH); ## here
Then I also found that $SH->select isn't a member, either.
Why doesn't this work? I thought IO::Handle objects were glob refs, which is why you can use print {$handle} "hello world".
Looking at IO::Scalar.pm, it seems that it's a blessed hash. It doesn't inherit from IO::Handle, even though the docs say "This class implements objects which behave just like FileHandle (or IO::Handle) objects..." is that incorrect?
Just how do you select one of these?
—John
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: select and IO::Handle
by danger (Priest) on Aug 04, 2001 at 01:21 UTC | |
Re: select and IO::Handle
by runrig (Abbot) on Aug 04, 2001 at 01:30 UTC | |
by John M. Dlugosz (Monsignor) on Aug 04, 2001 at 02:17 UTC |
Back to
Seekers of Perl Wisdom