Content deleted Content added
→External links: This is not about Perl itself, but details of the language. Removed categories so it doesn't show up in places it shouldn't. |
Mindmatrix (talk | contribs) update to Raku (programming language) |
||
Line 279:
Syntactically, this structure behaves similarly to [[switch statement]]s found in other languages, but with a few important differences. The largest is that unlike switch/case structures, given/when statements break execution after the first successful branch, rather than waiting for explicitly defined break commands. Conversely, explicit <code>continue</code>s are instead necessary to emulate switch behavior.
For those not using Perl 5.10, the Perl documentation describes a half-dozen ways to achieve the same effect by using other control structures. There is also a Switch module, which provides functionality modeled on
Perl includes a <code>goto label</code> statement, but it is rarely used. Situations where a <code>goto</code> is called for in other languages don't occur as often in Perl, because of its breadth of flow control options.
|