New subroutine Symbol::qualify_to_ref()
Subject: Re: select under use strict
On Tue, 11 Mar 1997 16:36:25 -0500 (EST), Trevor Blackwell <tlb@viaweb.com> said:
>
> use strict;
> syswrite(select,"",0) || warn("$!");
[...]
> yields:
>
> Can't use string ("main::STDOUT") as a symbol ref [...]
It seems a reasonable candidate for a new function in Symbol.pm, a
function just like qualify() which returns a globref. Here's an
implementation. I'll send this in again after 5.004. In the meanwhile
you could just put something like it in your own code.
Usage would be like
syswrite ref_qualify(select), "foo\n", 4 or die $!;
p5p-msgid: pzlo7ut03b.fsf@eeyore.ibcinc.com