Easier to do:
Code:
$rand = rnd(ubound($txt)-1)



BTW, if the lines are significant pairs (i.e. you want lines 1+2, 3+4, 5+6 and so on but never lines 2+3) the "random" line should look like this:
Code:
$rand = 2 * rnd(Int(ubound($txt)/2))