ruby-basics

is it right to assigning multiple variable like this a = b = c = d = 5 in ruby?

a = b = c = d = 5 puts (a) >> 5 puts (b) >> 5 puts (b) >> 5 puts (b) >> 5 a= a+1 puts (a) >> 6 puts (b) >> 5 i found there is no problem with the assigning value like this. my question is should one assign like the one given above or a , b, c, d = 5, 5, 5, 5 ...

how to find length of array class in ruby

$param=k.chomp.split("\t") how to find the lenght of $param thats is having class array. actully when i m writing puts $param.class i got the o/p like Array. now how to find the length of this array plzz help me i tried with $param.length but its not working ...