>>>>> "B" == Ben Tilly <ben_tilly / hotmail.com> writes:

>> my $m = 12;
>> sub toto {
>> my $m = 24;
>> }

B> Yes.  And with Perl I throw in "my" whenever I have
B> a temporary variable on principle.  That way I can
B> guarantee a lack of unwanted programatic side effects.
B> But I do not intentionally have multiple variables
B> meaning different things in nested scopes.

 Because you have seen only my first step with a let*

 The next step was :

pigeon% cat b.rb
#!./ruby
a = d = 12
def toto(a = 3, d = 2)
   do (a = 12)
      [['a', 'b'], ['c', 'd']].each do (a ; d = a)
         d += 1
         p "#{a} -- #{d}"
      end
      p "#{a} -- #{d}"
   end
   p "#{a} -- #{d}"
end
p "#{a} -- #{d}"
toto
p "#{a} -- #{d}"
p = lambda do (a ; d = 14)
   p "#{a} -- #{d}"
end
p[6, 24]
p "#{a} -- #{d}"
pigeon% 

pigeon% b.rb
"12 -- 12"
"ab -- 13"
"cd -- 13"
"12 -- 2"
"3 -- 2"
"12 -- 12"
"624 -- 14"
"12 -- 12"
pigeon% 


>> It's perhaps not complex for you, because you came with a perl
>> background :-)

B> In this case I think that Perl is the norm.

 Now can you say that this is not complex ?

 I've *three* syntax for ()


Guy Decoux