On Thu, 10 Aug 2000 19:29:29 -0700, Glenn Linderman wrote:

>Thanks for the clarification in your intentions, but isn't _any_ bareword is
>converted to a string, unless it is in some particular context where a bareword is
>meaningful (such as filehandle)?  So that seems to be nothing unique to =>.  You
>could just as well say
>
>      bareword, $whatever
>
>and get the same effect in perl5!

That is not my understanding of what is going on. Some examples:

1)
        $_ = "Hah!"
        print uc => $_;

prints a literal 'uc'

2)
        open FILE,">test.txt";
        $file = 'FILE';
        print $file "Ain't she sweet.\n";

prints to that file, so yes! a string can be used as a filehandle.
(Let's ignore the warning for now.)

I'd call it a symbolic reference, since you're passing the name of the
global filehandle.

IMO,
        bareword => $value

ALWAYS quotes the left hand side, even if it's a filehandle.

-- 
        Bart.

Reply via email to