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 is hash?

960


What are scalars in perl?

892


Explain perl. What are the advantages of programming in perl?

967


what is perl language?

879


How to turn on Perl warnings? Why is that important?

998


Explain tk?

909


What does -> symbol indicates in Perl?

920


Perl regular expressions are greedy" what does this mean?

852


How will you open a file in read-only mode in perl?

849


When does circular reference occur?

850


Enlist the advantages of using c over perl?

861


Which functions in perl allows you to include a module file. State their differences.

897


You want to print the contents of an entire array. How would you do that?

891


How many types of operators are used in the Perl?

973


How can you define “my” variables scope in Perl and how it is different from “local” variable scope?

1044