1.

What is Error Handling? What are the different types of errors in Perl?

Answer»

ERROR handling is the approach of taking appropriate actions against the program when it pops up with an error or is experiencing difficulty in executing the code. There are two types of errors in Perl: 

  • COMPILE Time Error: In this type of error, usually, programmers make mistakes with the syntaxes or miss file reference that deters the program from a successful compilation. 
  • Run Time Error: In this type of error, the program runs and then encounters an error at the time of running. Such errors are usually logical errors that GET produced due to incorrect output or illogical INPUT

Perl PROVIDES two built-in functions for generating fatal exceptions & warnings. These are: 

die()  warn()


Discussion

No Comment Found