Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re^3: RFC: Tutorial: use strict; now what!?

by moritz (Cardinal)
on Feb 09, 2012 at 05:06 UTC ( #952659=note: print w/ replies, xml ) Need Help??

in reply to Re^2: RFC: Tutorial: use strict; now what!?
in thread RFC: Tutorial: use strict; now what!?

However, in almost all cases a hash based solution is done is such away it has all the disadvantages of not using strict, and none of the advantages.

I disagree. Most beginner's uses of soft references are along the lines of

while (<>) { while (/([a-z]+)/g) { my $word = $1; $$word++; } } print "I've seen the word 'compiler'\n" if $compiler; # similar checks for a few other variables here

If you do that with a hash instead, you have a very clear benefit: you don't run into the risk of accidentally changing any our-scoped scalars in the current package.

Comment on Re^3: RFC: Tutorial: use strict; now what!?
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (10)
As of 2015-10-08 21:27 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (228 votes), past polls