From: Matthew Kerwin Date: 2012-12-20T09:09:06+09:00 Subject: Re: Perl to Ruby: regex captures to assignment. 7stud -- wrote in post #1089660: > Matthew Kerwin wrote in post #1089658: >> On 20 December 2012 09:07, Matthew Kerwin wrote: >> >>> >>> >> Sorry for replying to myself. I just noticed that the Perl code also >> had >> an explicit array, >> >> : ( 1, $frac_str, 0 ) >> > > That isn't an array in perl--it's a list. The direct translation from > perl to ruby doesn't work in this case. Semantically, and in the context, a Perl list is analogous with a ruby array. Since the languages are syntactically different (i.e. ruby doesn't allow delimited lists within a statement) and transliteration is, as you say, impossible, the most direct translation from a Perl list is to a ruby array. If I, as a ruby programmer, when talking to a Perl programmer, say "array" when clearly the syntax includes round parentheses, I'm fairly confident they should be able to understand my intention. If my slip was really that offensive, let me retract and rephrase as: > Sorry for replying to myself. I just noticed that the Perl code also > had an explicit /list/, Irrespective, it is still true that "those brackety thingies are important, no matter which language you're using." -- Posted via http://www.ruby-forum.com/.