I think this is what the OP is getting at. In ruby:
hard_to_spell_variable = 43
puts 'run a few statements'
puts "maybe output the var #{hard_to_spell_variable}"
hard_to_speel_variable = 'a new value' # oops...
print "output the new value."
puts " Should == 'a new value': #{hard_to_spell_variable}" # doh!!!
Whereas in perl, under the strict pragma, you get:
my $hard_to_spell_variable = 43
# ...
$hard_to_speel_variable = 'a new value' # perl throws a hissy fit.
This does present problems in other places as well. I've seen it a
couple of times when people are trying to define DSLs. You want to
force ruby to dispatch to missing_method, but it won't because it
assumes that you are trying to assign to a new local variable
my_dsl do
please_dispatch_method = 'some value'
# undefined local variable!
end
--
Lou