The following program, when executed, should generate the output, "Sample"; however, the program contains an error. Identify the line with error.
1) sub try (&@) {
2) my($try,$catch) = @_;
3) eval { &$try };
4) if ($@) {
5) local $_ = ;
6) &$catch;
7) }
8) }
9) sub catch (&) { $_[0] }
10) try {
11) die "Example";
12) } catch {
13) /Example/ and print "Sample\n";
14) };
Correct Answer:
5
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Perl MCQ Questions