Forum Discussion
uni
Aug 15, 2013Altostratus
I assume you want different actions depending on which of these strings match. I would use a switchstatement and put the myURI test after all the ones which also contain that string:
switch -glob -- $al_ctrl_parameter {
"*myURI_A1*" { do stuff }
"*myURI_A2*" { do stuff }
"*myURI_A3*" { do stuff }
"*myURI*" { do stuff }
}
It is kind of inefficient though. If the test string is the whole $al_ctrl_parameter, you can remove the -glob and asterisks, and then it would not be dependent on the order.