Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What purpose does each of the following serve: -w, strict, -
T ?

Answer Posted / savitha sridhar

-w to enable warnings mode
-T to enable Taint mode (TAINT mode puts a Perl script
into "PARANOID" mode and treats ALL user supplied input as
tainted and bad unless the programmer explicitly "OKs" the
data). Usually used when you are using a perl script that
you have downloaded and running but do not want any
security problems.

strict is a pragma in perl used to incorporate strict
programming practices.
Eg:

you could have written a small prog like this:

$x=100;
print $x;

with strict pragma "ON" you will be explicitly required to
specify the scope like,

use strict;
my $x=100; ##use of my to specify scope
print $x;

You can also switch off a pragma by using "no" like below
to switch off the pragma effect:

use strict;
my $x=100; ##use of my to specify scope
print $x;
no strict;
$y=200; ##no need to be specific
print $y;

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are prefix dereferencer and list them out?

1015


what are the two ways to get private values inside a subroutine or block?

913


What does the qq{ } operator do?

935


How would you ensure the re-use and maximum readability of your perl code?

922


Differentiate between use and require, my and local, for and foreach and exec and system

887


Explain use of ‘my’ keyword in perl?

924


How to get help for perl?

967


What is the use of -n and -p options?

1026


What is the use of -t?

945


How do I replace every TAB character in a file with a comma?

950


What are perl strings?

876


What is the tk module?

942


What does `$result = f() .. g()' really return?

1170


Explain the difference between die and exit in perl?

858


What are the different types of perl operators?

1050