- or download this
package Dragon;
use strict;
...
print $self->get_color ." dragon awakens from his slumber!\n";
}
1;
- or download this
package Trogdor;
use strict;
...
print $self->get_name ." burninates the land!\n";
}
1;
- or download this
#!/usr/bin/perl
use strict;
...
my $d = new Trogdor(); # create Trodgor
my $e = new Dragon(NAME => 'Smaug'); # create Smaug
my $f = new Dragon(); # create anonymous dragon
- or download this
Using perl 5.8.1-RC3 unless otherwise noted.
Apache/1.3.33 (Darwin) unless otherwise noted.
Mac OS X 10.3.9 unless otherwise noted.