What will be the output of the following Perl program?
sub myExample {
my $a = shift;
return sub { my $b = shift; print "$a, $b!\n"; };
}
$var1 = myExample("Mango");
$var2 = myExample("Fruit");
&$var1("Potato");
&$var2("Vegetable");
Correct Answer:
Mango, Potato!
Fruit, Vegetable!
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Perl MCQ Questions