Forum Discussion
andrew_C1
Nimbostratus
Nov 30, 2015is there a way to pick a random entry from a list
I have implemented an F5 as a double nat device where both sides have overlapping address space. As a result i have no routing configured on the F5 but use irules to set next hops etc. Because of thi...
Kai_Wilke
MVP
Dec 04, 2015Hi Andrew,
I don't understand what your trying to achive, but to round-robin a TCL list you may want to use...
[lindex $members [expr {int(rand()*[llength $members])}]]
BTW: A List is not comparable to an array. A List is more or less just multiple strings chained in a row and seperated by spaces. An Array is also available in TCL and is more or less a collection of independent variables stored in a hash-based container. The order of List entries is always fixed and Arrays doens't even have an order.
Cheers, Kai
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
