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
You want to print the contents of an entire array. How would you do that?
Explain tk?
Explain the use of 'my' keyword in perl?
Which guidelines by Perl modules must be followed?
What are the steps involved when the cgi program starts running?
What is the difference between use and require in perl programming?
What is use of ‘->’ symbol?
How to close a directory in perl?
How do you match one letter in the current locale?
You want to empty an array. How would you do that?
What is perl scripting?
What is perl programming?
Why is it hard to call this function: sub y { "because" } ?
What is the use of now constructor in perl?
What is the usage of -i and 0s options?