From: "Berger, Daniel" Date: 2002-08-23T21:28:24+09:00 Subject: RE: Converting Perl scripts to Ruby? > -----Original Message----- > From: Giuseppe Bilotta [mailto:bilotta78@hotpop.com] > > Is there some (semi)automatic way to attempt such a thing? Or does it > have sense at all? If only there were... Such a beast would be incredibly difficult to write. The problem with writing something to convert Perl to Ruby would not only be the difficulty of parsing, but also the paradigm shift that occurs when moving from Perl to Ruby. In other words, you could convert from a functional style to a functional style, but it would be difficult to convert it to an OO paradigm. This is not to minimize the problems with parsing. Can you imagine trying to parse an convert some of the more obfuscated code? Yikes! As it stands, if you know Perl and have a decent handle on Ruby it's not that difficult to 'translate' the syntax. For the most part, the functions in Perl are class or instance methods in Ruby (there are a few exceptions). To give you an idea, it took me less than a day (and probably only about 2 hours) to convert version .11 of John McNamara's Spreadsheet::WriteExcel module into a working Ruby version. Just my .02 Regards, Dan