1.

Write a function that is only available inside the scope.

Answer»

$pvt = CALCULATION(5,5);
print("Result = $pvt\n");
SUB Calculation{
my ($fstVar, $secndVar) = @_;
my $SQUARE = sub {
return($_[0] ** 2);
};
return(&$square($fstVar) + &$square($secndVar));
}; OUTPUT: Result = 50

 



Discussion

No Comment Found