Programming Languages C Subjective
Mar 15, 2013

What is the importance of Perl warnings? How do you turn them on?

Detailed Explanation

Warnings are one of the most basic ways in which you can get Perl to check 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.

The traditional way of enabling warnings was to use the -w argument on the
command line:
perl -w myscript.pl
You can also supply the option within the "shebang" line:
#/usr/local/bin/perl -w

You can also mention use warnings with all, deprecated and unsafe options.
Eg: use warnings 'all';

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback