I want to have a large list of options in my script. The user will give input that matches only one of these parameters. I want to have several different options for executing the same commands, but I can't get ORs to work. Below I think it should look, any ideas on how to make work a or b?
switch -glob -- $opt {
"a" || "b" {
puts "you selected a or b, probably not both"
}
default {
puts "Your choice did not match anything"
}
}
source
share