InterviewSolution
$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
Your experience on this site will be improved by allowing cookies. Read Cookie Policy