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

Example

                                        

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

 

Suggest An Answer

No suggestions avaliable!