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 is warn function in perl?
Explain subroutine?
“Perl regular expressions match the longest string possible”. What is the name of this match?
Hi, I am a accountant. I am preparing a balance sheet but because of staff shortage and time pressures I cant complete it on time. There is lot of common data with last years which I need not retype and I can manage by editing last year’s balance sheet ? Is their any software on net where I can do this easily??
How to read multi lines from a file in perl?
What is subroutine in perl?
what is the function that is used to identify how many characters are there in a string?
Explain what is STDIN, STDOUT and STDERR?
What are perl strings?
Create a function that is only available inside the scope where it is defined ?
What is the purpose of redo statement?
What is the use of '>>' in perl?
How does polymorphism work in perl? Give an example.
How will you declare a variable in perl?
How will you access an element of a perl array?