Are the curly braces around each package necessary? the code appears to work without them. What purpose do they serve?{ package Animal; sub speak { our $class = shift; print "a $class goes ", $class->sound, "!\n"; } } { package Cow; our @ISA = qw(Animal); sub sound { "moooo" } } Animal::speak("Cow");
In reply to package question by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |