in reply to [Resolved]Perl inheritance

Hi,

I am not sure I understand your problem correctly. whatever I get from your query is that, you are trying to implement the inheritance feature.

In the above code you have given, Duck Package inherits the Animal package. In Duck package you are creating object for Duck, you need to call any function in Duck, for ex: speak() function, which is defined in Animal package, It will be get called, and your string in Duck package will be printed.

So Create object for Duck and call speak function like  Duck->new()->speak()


All is well