I read in Simon Cozens’ book “Beginning Perl” that -w switch for warnings would be deprecated going forward. Is this true or is it still ok to continue using -w rather than “use warnings”.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The perlrun documentation (see
perldoc perlrunor this page) indicates that the -w option is still available as of Perl 5.12.2. Using the pragma gets you nifty benefits though, like turning warnings on lexically and finer grained warnings.Here is a blurb on why you should use the pragma instead of the command line option.