Perl provides a reuse code ability which is called inheritance in this child class can use the methods of the parent class.

BY Best Interview Question ON 13 Jan 2019

Example

Package Parent;
Sub foo
    {
         print("Inside A::foo\n");
    }
 
package Child;
@ISA = (Parent);
package main;
Child->foo();
Child->bar();

 

Suggest An Answer