From: Eric Hodel Date: 2008-06-06T05:08:20+09:00 Subject: Re: A crosspost from the Perl Community On Jun 4, 2008, at 10:20 AM, Star Cross wrote: > From this Perl programmer's perspective, it takes some getting used > to. > Instinctively one wants to write > > _Perl Code_ > foreach my $member @array { ... } > > rather than > > _Ruby Code_ > array.each { ... } I no longer think this way about programs I write. Enumerable and block argument multiple assignment allow you to not care about what type of object is on the left hand side. Instead you can use friendly variable names to make your code very readable. An arbitrary example would be: meetings = { 'eric' => ['thursday at 1100', '206-555-0000'] 'ryan' => ['thursday at 1300', '206-555-0001'] } meetings.each do |callee, (time, phone_number)| puts "call #{callee} at #{time} on #{phone_number}" end