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
What does localtime() do in perl?
What is perl programming?
Explain lists ?
How to merge two arrays in perl?
Create a function that is only available inside the scope where it is defined ?
Can you add two arrays together?
What is the difference between perl array and perl hash?
Why to use perl scripting?
Give an example of the -i and 0s option usage.
What does a die() function do in perl?
What are the different string manipulation operators in perl?
How to check the status of airplane mode (enable/disable) in perl for Android mobile?
In Perl, what is grep function used for?
How to add elements in a hash in perl?
What is an interpolation in perl?