From: Ferdous ara Date: 2012-11-23T05:39:08+09:00 Subject: Re: how to increase variable inside the while loop HI thanks at last i did like this current=`curl ................` current_result=JSON.parse(current) remote_1=`curl ...........` remote1_result=JSON.parse(remote_1) remote_2=`........................` remote2_result=JSON.parse(remote_2) #puts "[INFO] Going Through All the #{linecount} pimps " $i = 1 $num = linecount.to_i + 1 #$faulty_count = 0 while $i < $num do var1= current_result["servername-#$i"]["usable"] var2= remote1_result["servername-#$i"]["usable"] var3= remote2_result["servername-#$i"]["usable"] puts "#{var1} #{var2} #{var3}" end $i +=1 end So the output its like 324617621504 376666077184 378329620480 338000445440 396440872960 337314316288 403153707008 450874927104 399995699200 697021360128 285726838784 281589653504 So now what i am after is : need to compare if one of the value is 60% less the rest of the two 697021360128 285726838784 281589653504 this is currently is going to out of my knowledge .. thanks for help -- Posted via http://www.ruby-forum.com/.