|We don't bite newbies here... much|
Re: switch statementby 2teez (Curate)
|on Sep 20, 2013 at 04:44 UTC||Need Help??|
I got a stupid programming question: can switch statment inside switch statement? I mean switch inside a switch? double switchOne of the paragraph of one of the links you provided namely Switch.html says and I quote
Note that switch -es can be nested within case (or any other) blocks, and a series of case statements can try different types of matches -- hash membership, pattern match, array intersection, simple equality, etc. -- against the same switch value...
More importantly, you may want to use given/when instead of switch because old Switch used source filtering and had other limitations. Please read the Documentations of the links you provided for this.
Lastly, you could also try this thing out and see what you get anyway.
If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me