in reply to [Resolved]Perl inheritance

However reading online this is different from the stuff I had and the code doesn't print out anything when running and testing it. From what I gathered it's supposed to print "I am a duck" but it does nothing at all.

The code you posted here is not supposed to print anything, it makes no animal objects, it invokes no methods on those objects

Duck->new->speak

Animal->new->speak

Your class Duck inherits from Animal
a Duck is a type of animal
Patka je vrsta Životinje
Patka nasljeđuje od Životinja
http://translate.google.com/translate?sl=auto&tl=hr&js=y&prev=_t&hl=en&ie=UTF-8&u=http%3A%2F%2Fperldoc.perl.org%2Fperlobj.html&edit-text=&act=url, perlobj