Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Why you should use strict

by Abigail-II (Bishop)
on Jun 27, 2003 at 22:50 UTC ( [id://269770]=note: print w/replies, xml ) Need Help??


in reply to Why you should use strict

I'm not quite sure what you think the uncommenting of use strict is going to show. It's certainly not going to forbid the use of symbolic references! Because that's something that happens at run time, and the code above doesn't compile when turning on strict. You can fix this by using $::ref, $::aaa, etc. Then you will a "useful" message about using scalar references when turning on strict.

However, the example doesn't impress me at all. Without strict, there's nothing dangerous or even strange happening. In fact, Perl is quite doing what people would expect. You'd have to come up with a better example if you want people to get hooked to use strict - this example will just get them hooked to using symbolic references.

Abigail

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://269770]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-03-28 08:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found