> From: Christoph [mailto:chr_news / gmx.net] > > "Kent Dahl" <kentda / stud.ntnu.no> wrote in > .... > > > [@a, @b].collect! { |iv| iv+=1 } > > > > This doesn't appear to change the values of @a and @b, > > which it seems like the OP wanted. > > Okay what about > > def inc_iv > @a,@b = [@a,@b].collect! { |iv| iv+=1 } > end > /Christoph That's not bad and seems like the closest to what I was hoping to achieve. Don't know why I didn't think to include this in my original post, but here's the Perl for the situation that I was trying to express equally as compactly in Ruby syntax: $a = 1; $b = 2; foreach $var (\$a, \$b) { $$var++; } print "$a $b\n" # -> "2 3" Thanks for all the suggestions, - jeff