__FILE__ works as bareword

[email protected] (Jim Avera)
Newsgroups perl.perl5.porters
Message-ID <[email protected]>
This may have come up before, I don't recall.   Special tokens like 
__FILE__ are not interpolated if they appear in a position where a 
bareword hash key is allowed.

   perl -E 'my @a = (__FILE__ => 42); say $a[0];'     # v5.43.2
   >> __FILE__

Is this a bug?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.