How would you trap error occurred in the perl program/file?
Answer Posted / perly_whirly
Put your code inside of an eval. If an error occurs, the $@ variable will contain
the error. You can also raise an error by using die inside of an eval.
Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
Explain perl. What are the advantages of programming in perl?
You want to empty an array. How would you do that?
How to implement a stack in Perl?
what are the three groups involved in information sharing?
What are the options that can be used to avoid logic errors in perl?
What does init 5 and init 0 do?
What does cgi program store?
What's the difference between /^Foo/s and /^Foo/?
Why to use perl scripting?
Explain lists in perl?
What is automatic error handling in perl?
Explain lists and ivalue?
Which of these is a difference between Perl and C++ ?
How many types of variable in perl?
Explain chomp, chop, cpan, tk.