How can you use Perl warnings and what is the importance to use them?

Answer

The Perl warnings are those in which Perl checks the quality of the code that you have produced. Mandatory warnings highlight problems in the lexical analysis stage. Optional warnings highlight cases of possible anomaly.

Perl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
usewarnings;# it is same as importing "all"
 
nowarnings;# it is same as unimporting "all"
 
usewarnings::register;
 
if(warnings::enabled()){
 
warnings::warn("any warning");
 
}
 
if(warnings::enabled("void")){
 
warnings::warn("void","any warning");
 
}

All perl Questions

Ask your interview questions on perl

Write Your comment or Questions if you want the answers on perl from perl Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---