note
kcott
<p>G'day [virtuemart2],</p>
<p>
Unfortunately, your post is ambiguous. This is an instance where case is important.
Are you talking about <c>switch</c> (lowercase), as you've written twice as <em>"switch statement"</em>;
or, are you talking about <c>Switch</c> (uppercase), a module you've shown two links for?
</p>
<h4>The 'Switch' Module</h4>
<ul>
<li>
This module was deprecated in 5.12.0 - see "[http://perldoc.perl.org/perl5120delta.html#Deprecated-Modules|perl5120delta: Deprecated Modules]".
</li>
<li>
It was removed from the core distribution in 5.14.0 - see "[http://perldoc.perl.org/perl5140delta.html#Removed-Modules-and-Pragmata|perl5140delta: Removed Modules and Pragmata]".
</li>
<li>
It is still available on CPAN - see "[http://search.cpan.org/perldoc?Switch|Switch]".
</li>
</ul>
<h4>The 'switch' Feature</h4>
<ul>
<li>
This was introduced in 5.10.0 - see "[http://perldoc.perl.org/perl5100delta.html#Switch-and-Smart-Match-operator|perl5100delta: Switch and Smart Match operator]".
</li>
<li>
It provided three new keywords: <c>given</c>, <c>when</c> and <c>default</c>. Together, they can be used to write a <em>switch statement</em>.
</li>
<li>
It is <em>highly experimental</em>! It is subject to change with little notice and, as such, is not suitable for production code - see "[http://perldoc.perl.org/perlsyn.html#Experimental-Details-on-given-and-when|perlsyn: Experimental Details on given and when]".
</li>
</ul>
<h4>Your Original Question</h4>
<p>
As explained, the ambiguous nature of your question means I don't really know exactly what you're asking.
However, by way of an answer, here's another question: <em>"Why don't you try it yourself and see?"</em>
</p>
<p><em>
[Aside: Please see "[43037|What shortcuts can I use for linking to other information?]" to post actual links instead of URLs as text.]
</em></p>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-861371">
<p>-- Ken</p>
</div></div>
1054948
1054948