$sym = gensym;
$_ = <$sym>;
ungensym $sym; # no effect
print qualify("x"); # "main::x"
print qualify("x", "FOO"); # "FOO::x"
print qualify("BAR::x"); # "BAR::x"
print qualify("BAR::x", "FOO"); # "BAR::x"
print qualify("STDOUT", "FOO"); # "main::STDOUT" (global)
print qualify(\*x); # \*x--for example: GLOB(0x99530)
print qualify(\*x, "FOO"); # \*x--for example: GLOB(0x99530)
creates an anonymous glob and returns a reference
to it. Such a glob reference can be used as a filehandle or directory
For backward compatibility with older implementations that didn't
support anonymous globs,
is also provided.
But it doesn't do anything.
turns unqualified symbol names into qualified
variable names (for example,
). If it is given a second parameter,
uses it as the default package; otherwise, it uses
the package of its caller. Regardless, global variable names (for example,
always qualified with
Qualification applies only to symbol names (strings). References are
left unchanged under the assumption that they are glob references,
which are qualified by their nature.