in reply to Indirect filehandles

While I don't have an answer to your question, I do have a question for you - why are you using the typeglob to begin with? I would, instead, do something like:

use FileHandle; my $out = new FileHandle ">&STDOUT"; autoflush $out; my $in = new FileHandle "<&STDIN";

That way, you don't have any typeglob confusion.

Now, the method above doesn't work in Win32 the way it does in Unix, cause you cannot select on $in. (Of course, I have a sneaking suspicion that you cannot select on STDIN, no matter how you try to do it, but that's neither here nor there...)

Replies are listed 'Best First'.
Re: Re: Indirect filehandles
by nysus (Parson) on Jul 17, 2001 at 21:57 UTC
    Yes, I know there is usually little need nowadays for this kind of indirect filehandle. My question is to just satisfy my curiousity. I did find out that the assigment as a reference is blessable. See How can I use a filehandle indirectly?. But I think there has to be some other difference.

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop";
    $nysus = $PM . $MCF;
    Click here if you love Perl Monks