$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
Size is just an alias for length.
Aurril
2010-07-06 07:12:38
+1
A:
Ref Array class
k = "This \t is \t just \t testing"
$param=k.chomp.split("\t")
array_length= $param.length #or $param.size
puts "legth of $param is : #{array_length}"
o/p
legth of $param is : 4
Salil
2010-07-06 07:29:16
thanks salil$param.size is working but $param.length is not working
Amit singh tomar
2010-07-06 08:08:40