UrbanPro

Find the best tutors and institutes for Perl Training

Find Best Perl Training classes

Please select a Category.

Please select a Locality.

No matching category found.

No matching Locality found.

Outside India?

Search for topics

In the Perl operating language, what is the significance of the -w, -t and STRICT functions?

Asked by Last Modified  

IT Courses/Programming Languages/Perl Training

Follow 0
Answer

6 Answers

Please enter your answer

Trainer

-w is for wanings enabled, -t means taint mode (for security purpose) and strict allows us to write less error prone programs. It enables to restrict unsafe constructs like you need to declare a variable before using it and many more. You write a program, you will understand more. Always write...
read more
-w is for wanings enabled, -t means taint mode (for security purpose) and strict allows us to write less error prone programs. It enables to restrict unsafe constructs like you need to declare a variable before using it and many more. You write a program, you will understand more. Always write below two line for better code in Perl. use strict; use warnings; Hope this helps. read less
Comments

Perl Developer | Perl Trainer

Warnings: (-w) warnings, is a improved version of the -w flag. The warnings pragmata provides us with lots of run-time warnings that in many cases indicate some kind of a problem or a potential problem. Taint: (-T) Perl automatically enables a set of special security checks, called taint mode, when...
read more
Warnings: (-w) warnings, is a improved version of the -w flag. The warnings pragmata provides us with lots of run-time warnings that in many cases indicate some kind of a problem or a potential problem. Taint: (-T) Perl automatically enables a set of special security checks, called taint mode, when it detects its program running with differing real and effective user or group IDs. You can also enable taint mode explicitly by using the -T command line flag. This flag is strongly suggested for server programs and any program run on behalf of someone else, such as a CGI script. Once taint mode is on, it's on for the remainder of your script. Strict: To help you catch typos so you can quickly get on to finding more significant problems (and so we don't have to catch the typos for you either), among other reasons. Its difficult to spot '$recieve_date' when on the previous page you've been calling it '$receive_date'. Also, to give your variables as small a scope as possible so that you don't have to worry about what they're doing to other parts of your program (although that's the function of my, it forces you to use my which when properly used helps achieve this goal). The pragmas catch many errors sooner than they would be caught otherwise, which makes it easier to find the root causes of the errors. The root cause might be the need for an error or validation check, and that can happen regardless or programmer skill. read less
Comments

Perl trainer with 8 years of experience

To add to the above said points from various perl practitioners: -w (warnings): Using -w flag while executing a perl program spits out warning messages when it identifies that perl program consists of possible coding mistakes. The warning messages will be displayed for the below anomalies. 1. Any operation...
read more
To add to the above said points from various perl practitioners: -w (warnings): Using -w flag while executing a perl program spits out warning messages when it identifies that perl program consists of possible coding mistakes. The warning messages will be displayed for the below anomalies. 1. Any operation (except initialization) attempted on the uninitialized variables 2. Comparison operation is attempted on variables holding different types of data (ex: string with number) 3. Redefining an already defined subroutine within the same program (multiple definition). strict: This package helps in enforcing couple of programming standards into perl program. Below are the list of programming standards enforced by strict package. 1. All the variables must be defined with a specific scope (my,local,our). 2. Symbolic references should not be used in the program. while -w is non-fatal it just throws up the warnings and your program will still continue for further execution, while strict is fatal. So any violation of the programming standards specified by strict would cause the program to terminate. read less
Comments

Trainer

strict is a module which is mandatory to be in use for each perl program you write. We can say this is similar to gcc compiler options. such as -Wall etc .. You can write program without using strict module. Strict helps you to detect the error of statement before it ends in unexpected output.
Comments

IT professional trainer with 5+yrs of Exp in PERL and PYTHON

-w used for Warnings like a variable is declared but not used, a variable is used before being set, etc.... -t is taunt check , Perl takes special precautions called taint checks to prevent both obvious and subtle traps. Some of these checks are reasonably simple, such as verifying that path directories...
read more
-w used for Warnings like a variable is declared but not used, a variable is used before being set, etc.... -t is taunt check , Perl takes special precautions called taint checks to prevent both obvious and subtle traps. Some of these checks are reasonably simple, such as verifying that path directories aren't writable by others; careful programmers have always used checks like these. STRICT is for syntactical checkings like each line ended with ; or not, open curly brace given { but there is no corresponding closing curly brace }, etc.... read less
Comments

Freelance technical trainer / consultant (Embedded systems, Automation / Scripting) : C, Linux, Embedded systems, python, perl, tcl

-w and -t look very similar. They are related to warnings but they have subtle difference. Instead of -w , you can use use warnings as well. use strict is to enable all fatal warnings (error prone warnings). use warnings (or -w) will show warnings but will proceed with execution. use strict...
read more
-w and -t look very similar. They are related to warnings but they have subtle difference. Instead of -w , you can use use warnings as well. use strict is to enable all fatal warnings (error prone warnings). use warnings (or -w) will show warnings but will proceed with execution. use strict will show error prone warning messages and stops (will not proceed with execution). You can also look into documentation for example perl --help in windows and linux man perl on linux read less
Comments

View 4 more Answers

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

AUTOLOAD subroutine
Whenever you call a subroutine that does not exist in a package, it raises an error. If you want to handle this scenario, you can include AUTOLOAD subrotine in your package. With AUTOLOAD you can call...

Sudheer S | 18/11/2016

0 0
0

Recommended Articles

Hadoop is a framework which has been developed for organizing and analysing big chunks of data for a business. Suppose you have a file larger than your system s storage capacity and you can t store it. Hadoop helps in storing bigger files than what could be stored on one particular server. You can therefore store very,...

Read full article >

Information technology consultancy or Information technology consulting is a specialized field in which one can set their focus on providing advisory services to business firms on finding ways to use innovations in information technology to further their business and meet the objectives of the business. Not only does...

Read full article >

Microsoft Excel is an electronic spreadsheet tool which is commonly used for financial and statistical data processing. It has been developed by Microsoft and forms a major component of the widely used Microsoft Office. From individual users to the top IT companies, Excel is used worldwide. Excel is one of the most important...

Read full article >

Whether it was the Internet Era of 90s or the Big Data Era of today, Information Technology (IT) has given birth to several lucrative career options for many. Though there will not be a significant" increase in demand for IT professionals in 2014 as compared to 2013, a steady demand for IT professionals is rest assured...

Read full article >

Looking for Perl Training classes?

Find best Perl Training classes in your locality on UrbanPro.

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Perl Training Classes?

Find best tutors for Perl Training Classes by posting a requirement.

  • Post a learning requirement
  • Get customized responses
  • Compare and select the best

Looking for Perl Training Classes?

Find best Perl Training Classes in your locality on UrbanPro

Post your learning requirement

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more