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 a tell function in perl?
Explain grooving and shortening of arrays?
What is the use of now constructor in perl?
What is “grep” function in perl?
What is a perl references?
Explain tk?
How the interpreter is used in Perl?
Why aren't Perl's patterns regular expressions?
How to check the status of airplane mode (enable/disable) in perl for Android mobile?
Explain strftime() function in perl?
How can I display all array element in which each element will display on next line in perl ?
What is goto statement in perl?
Which of these is a difference between Perl and C++ ?
How to remove a directory in perl?
How to convert arrays into a string in perl?