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 does the command "use strict" do and why should you
use it?

Answers were Sorted based on User's Feedback



What does the command "use strict" do and why should you use it? ..

Answer / prabin kumar, xansa(ind) chenn

"Use strict" is one of the pragma used for checking the
variable scope and syntax. If you use this pragma means,
you need to specify the scope (my, local, our) for the
variable and use the exact usage of operators.
For eg. Checking equality $number = 1 and $char eq 'a'.

Is This Answer Correct ?    22 Yes 0 No

What does the command "use strict" do and why should you use it? ..

Answer / savitha sridhar

strict is a pragma that can be used to enforce Strict
programming practices while you write your programs.

Eg: You can write a program like this:

$x=100
print $x

But if you use strict pragma, then you have to be very
specific while using variables

use strict;
my $x=100; ##look at the usage of scope like my,local,our
print $x;

Pragma usage can also be used as a toggle

use strict;
my $x=100;
print $x;
no strict; # to toggle strict to "No"
$y=200; ##no need to use scope as strict is disabled
print $y;

Is This Answer Correct ?    17 Yes 0 No

Post New Answer

More CGI Perl Interview Questions

How to renaming a file in perl programming?

0 Answers  


What are scalars in perl?

0 Answers  


How many types of variable in perl?

0 Answers  


What elements of the Perl language could you use to structure your code to allow for maximum re-use and maximum readability?

1 Answers  


List the data types that Perl can handle?

0 Answers  


What are the logical operators used for small scale operations? Explain them briefly.

0 Answers  


What are the arguements we normally use for perl interpreter?

0 Answers  


What do you mean by context of a subroutine?

0 Answers  


what are the three groups involved in information sharing?

0 Answers  


How will you declare a variable in perl?

0 Answers  


Explain the arguments for perl interpreter.

0 Answers  


Explain USE and REQUIREMENT statements?

0 Answers  


Categories