From: "James F. Hranicky" Date: 2004-09-17T00:59:32+09:00 Subject: Re: Ex-Perl coders: Howz it feel to convert to Ruby? On Wed, 15 Sep 2004 23:54:51 +0900 Chris wrote: > So I'm looking for feedback from those that have converted, esp. from a > hardcore Perl perspective. Recently it dawned on me that one of the reasons I like Ruby so much is method chaning. Why? At first, I thought it was because the program flow went left to right, just like reading. But then it occurred to me that being able to do something like this: `ypcat -k amd_cise`.map { |line| line.match(/rhost:=([^;]+)/).captures[0] rescue next }.compact.sort.uniq.each { |server| ... is just like using Unix pipes. When I used perl, and I needed to process the output of a command like the above, I would generally do all the work with a regular Unix pipeline. With ruby, the processing is very similar already. You have to do a little more work, like catching exceptions and things like nil elements, but the program flow is so natural there's no need to exec the extra programs. I recently tried hacking on some Perl (I've written thousands of lines over the years), and I can barely even remember what to do, which is fine, really :-> Jim