Fellow monks,
While trying to learn more about the symbol table I printed out %main:: in a script whose only imported package was
strict. The code and it's output are below, can anyone tell me what the mystery entries are on lines 5, 11, and 14 of the output text? Apparently the standard windows charset doesn't represent them?
TIA
jg
#!/usr/bin/perl -w
use strict;
while (my ($k, $v) = each %::) {
print "key is $k, value is $v\n";
}
key is STDOUT, value is *main::STDOUT
key is @, value is *main::@
key is ARGV, value is *main::ARGV
key is STDIN, value is *main::STDIN
key is , value is *main::
key is attributes::, value is *main::attributes::
key is DB::, value is *main::DB::
key is _<..\xsutils.c, value is *main::_<..\xsutils.c
key is _<perllib.c, value is *main::_<perllib.c
key is UNIVERSAL::, value is *main::UNIVERSAL::
key is , value is *main::
key is <none>::, value is *main::<none>::
key is DynaLoader::, value is *main::DynaLoader::
key is , value is *main::
key is Win32::, value is *main::Win32::
key is BEGIN, value is *main::BEGIN
key is stderr, value is *main::stderr
key is INC, value is *main::INC
key is _, value is *main::_
key is ", value is *main::"
key is _<.\win32.c, value is *main::_<.\win32.c
key is $, value is *main::$
key is stdout, value is *main::stdout
key is IO::, value is *main::IO::
key is ENV, value is *main::ENV
key is strict::, value is *main::strict::
key is stdin, value is *main::stdin
key is CORE::, value is *main::CORE::
key is /, value is *main::/
key is 0, value is *main::0
key is _<..\universal.c, value is *main::_<..\universal.c
key is STDERR, value is *main::STDERR
key is main::, value is *main::main::
_____________________________________________________"The man who grasps principles can successfully
select his own methods.
The man who tries methods,
ignoring principles, is sure to have trouble.
~ Ralph Waldo Emerson
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.