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 does localtime() do in perl?

939


What is perl programming?

957


Explain lists ?

880


How to merge two arrays in perl?

978


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

943


Can you add two arrays together?

860


What is the difference between perl array and perl hash?

974


Why to use perl scripting?

928


Give an example of the -i and 0s option usage.

831


What does a die() function do in perl?

928


What are the different string manipulation operators in perl?

863


How to check the status of airplane mode (enable/disable) in perl for Android mobile?

3031


In Perl, what is grep function used for?

1007


How to add elements in a hash in perl?

853


What is an interpolation in perl?

927