X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlsyn.pod;h=9d0c9209eaa8d220486b666a7a84e3b9226c282f;hb=4521542890c02b2ddcb4a39429066bc380e4e5e7;hp=aad4efd2f7718fbde5c7b0aa8c9d7a77ccbb31f6;hpb=b78df5de4cbb361d400476487114def2ea80ea60;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod index aad4efd..9d0c920 100644 --- a/pod/perlsyn.pod +++ b/pod/perlsyn.pod @@ -393,8 +393,18 @@ structures. } There is no official C statement in Perl, because there are -already several ways to write the equivalent. In addition to the -above, you could write +already several ways to write the equivalent. + +However, starting from Perl 5.8 to get switch and case one can use +the Switch extension and say: + + use Switch; + +after which one has switch and case. It is not as fast as it could be +because it's not really part of the language (it's done using source +filters) but it is available, and it's very flexible. + +In addition to the above BLOCK construct, you could write SWITCH: { $abc = 1, last SWITCH if /^abc/;