From: Dave Thomas Date: 2000-03-15T11:47:49-06:00 Subject: [ruby-talk:01848] Re: Perl ==> Ruby Question "David Douthitt" writes: > I looked at the archives, but didn't find what I want. How do I > convert this fragment into Ruby? > > ($var1, $var2, $var3) = split(":"); $_ = "Quick:brown:fox" v1, v2, v3 = split(":") p v1 #-> Quick p v2 #-> brown p v3 #-> fox > I might also make note that Ruby is actually LESS free-form than > Perl - Perl uses ";" as a command terminator; Ruby uses newlines! > So you can't have a multi-line statement without some kind of > "continuation" marker, as much as I can tell. Well, you can use semicolons in Ruby too: $_ = "Quick:brown:fox"; v1, v2, v3 = split(":") p v1; p v2; p v3 Regards Dave