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

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

Thread Next
Hallvard B Furuseth
June 26, 2002 05:36
[ID 20020626.001] strict vars do not catch %<char(160)>
Message ID:
#!/local/bin/perl -wl
use strict 'vars';
$ {"Q::foo"} = 3;   # This is $<space>{"Q::foo"}.
print $d{"Q::foo"}; # This is $<char(160)>{"Q::foo"}.

This program warns:
    Use of uninitialized value in print at /tmp/ line 3.
I think it should die with:
    Global symbol "% " requires explicit package name at /tmp/ line 3.
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