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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you add two arrays together?

525


What is the importance of perl warnings? How do you turn them on?

535


Explain subroutine in perl?

484


What does redo statement do in perl?

527


What is it meants by '$_'?

532






How to disable the mod_perl from apache_server as i have used perlfect search on the site and its pagination is not working and the remedy is to disable the mod_perl.

1788


Explain the difference between declarations of 'my' and 'local' variable scope in perl?

498


Hi, I am a accountant. I am preparing a balance sheet but because of staff shortage and time pressures I cant complete it on time. There is lot of common data with last years which I need not retype and I can manage by editing last year’s balance sheet ? Is their any software on net where I can do this easily??

1754


How to read a directory in perl?

528


Why should I use the -w argument with my Perl programs?

552


How to close a directory in perl?

492


what is the difference between java and cgi?

555


Which statement has an initialization, condition check and increment expressions in its body? Write a syntax to use that statement.

542


What does 'do' statement do in perl?

495


How to replace perl array elements?

524