in reply to Unicode source code problem in 5.6.1

Variables whose names begin with control characters are forced into main:: no matter what package you are in. This is how things like ${^TAINT} work (which is a variable named "\ctAINT" -- note that "\ct" is CTRL-T). This sounds like a simple bug where "control character" has been implemented as something like "not ' '..'~'" or "not /^[a-z_]/i".

Note that this bug does not require 'use utf8' as this code:

use strict; my $ì= 10;
just uses plain 8-bit Latin1 and results in: Can't use global $^= in "my", near "my $ì" which also hints that I'm correct about the source of the bug since it reports the variable name as "$^=".

Update: Ah, a different bug with "unusual" variable names.

        - tye

Replies are listed 'Best First'.
Re: (tye)Re: Unicode source code problem in 5.6.1
by John M. Dlugosz (Monsignor) on Nov 18, 2002 at 20:23 UTC
    I suspected a control-character bug, and tried having the variable begin with a regular letter. same problem. And it's not "can't use a global in my", but a totally different error, which implies that it thinks the variable is being referenced, not defined!

    I just tried another test, and it's not being forced into package main but can co-exist in other packages.

    Since it goes away when I'm not strict, it seems like the bug is in recognising a usage before a definition; once passed that, it actually works OK.