+1 vote
in Perl by
Which feature of Perl provides code reusability ? Give any example of that feature.

1 Answer

0 votes
by
Inheritance feature of Perl provides code reusability. In inheritance, the child class can use the methods and property of parent class

Package Parent;

Sub foo

{

print("Inside A::foo\n");

}

package Child;

@ISA = (Parent);

package main;

Child->foo();

Child->bar();
...