develooper Front page | perl.perl5.porters | Postings from June 2002

[ID 20020626.002] strict vars do not catch %<char(160)>

Thread Next
Hallvard B Furuseth
June 26, 2002 05:40
[ID 20020626.002] strict vars do not catch %<char(160)>
Message ID:
Please ignore the previous bug report.  Bad cut&paste.  Next attempt:

#!/local/bin/perl -wl
use strict 'vars';
$ {"Q::foo"} = 3;   # This is $<space>{"Q::foo"}.
print $ {"Q::foo"}; # This is $<char(160)>{"Q::foo"}.

This program warns:
    Use of uninitialized value in print at /tmp/ line 4.
I think it should die with:
    Global symbol "% " requires explicit package name at /tmp/ line 4.
Because it didn't, it took me hours to narrow the problem down
until I found the char(160).  After all, it _looks_ just fine.


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About