Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is warn function in perl?

948


Explain subroutine?

910


“Perl regular expressions match the longest string possible”. What is the name of this match?

935


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??

2143


How to read multi lines from a file in perl?

914


What is subroutine in perl?

940


what is the function that is used to identify how many characters are there in a string?

956


Explain what is STDIN, STDOUT and STDERR?

1027


What are perl strings?

882


Create a function that is only available inside the scope where it is defined ?

984


What is the purpose of redo statement?

1009


What is the use of '>>' in perl?

995


How does polymorphism work in perl? Give an example.

860


How will you declare a variable in perl?

962


How will you access an element of a perl array?

939