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.
|
---|
In Section
Meditations