From: Zach Dennis Date: 2004-08-20T11:12:17+09:00 Subject: Shortest if Assignment Statement I am playing with different assignment statements and I am using the normal cross-language terinary operator a = a==1 ? a : -1 Is there a shorter way to cheat this? I am dealing with a Hash and I would like to perhaps do something like: hsh = { '*' => '(*)' , 'a' => '(1){2}' } val = "b" a = hsh[ val ] or hsh['*'] #to give me, a = '(*)' val = "a" a = hsh[ val ] or hsh['*'] #to give me, a = '(1){2}' Thanks, Zach