garymgordon
Programmer
Please explain ... SPECIFICALLY ... why, when running the following code ... the print $A::variable; and print $B::variable; will not print anything.
What is exactly happening here. I am kind of confused with the way my $variable is being handled. If you can be as specific as possible.
Thanks ..................
my $variable = "Not in either package\n";
package A;
$variable = "In package A\n";
package B;
$variable = "In package B\n";
print $A::variable;
print $B::variable;
===
doesn't print anything. Why?
Gary
Gary M. Gordon, LLC
webmaster@garymgordon.com
Certified Web Developer ::
Application Programmer
What is exactly happening here. I am kind of confused with the way my $variable is being handled. If you can be as specific as possible.
Thanks ..................
my $variable = "Not in either package\n";
package A;
$variable = "In package A\n";
package B;
$variable = "In package B\n";
print $A::variable;
print $B::variable;
===
doesn't print anything. Why?
Gary
Gary M. Gordon, LLC
webmaster@garymgordon.com
Certified Web Developer ::
Application Programmer