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.
use warnings; # it is same as importing "all"
no warnings; # it is same as unimporting "all"
use warnings::register;
if (warnings::enabled()) {
warnings::warn("any warning");
}
if (warnings::enabled("void")) {
warnings::warn("void", "any warning");
}