Forum Discussion
Blake_79204
Feb 08, 2012Nimbostratus
lassign alternative
I'm having a hard time finding documentation for this that is specific to Big-IP v 11, but it looks like iRules are based on Tcl 8.4.6. The command lassign wasn't introduced in Tcl until v8.5. This ...
Blake_79204
Feb 09, 2012Nimbostratus
It looks like that might work - lassign would have let me parse through each instance of $fields and set each as a variable with it's own name.
I think I can use lindex to select records one at a time based upon their location in the list, but I'm not clear on how to then set that record as a new variable.
For a little context - I'm trying to read an http page that has a list of strings (currently seperated by colons, but could be seperated by anything.) Then, once I have that list, I want to take each item and set it as an individual variable, which I'm then going to store and use elsewhere. So, really, I just need a decent way to read the list and store the values found there.
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