Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: switch statement

by 2teez (Priest)
on Sep 20, 2013 at 04:44 UTC ( #1054955=note: print w/ replies, xml ) Need Help??

in reply to switch statement

Hi virtuemart2,

I got a stupid programming question: can switch statment inside switch statement? I mean switch inside a switch? double switch
One 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

Comment on Re: switch statement
Replies are listed 'Best First'.
Re^2: switch statement
by virtuemart2 (Novice) on Sep 23, 2013 at 06:24 UTC
    "you may want to use given/when instead of switch because old Switch used ..."

    I have to use old one, switch statement

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1054955]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2015-11-26 01:29 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (695 votes), past polls