™.. Switch - Online Linux Manual PageSection : 3pm
Updated : 2009-03-30
Source : perl v5.10.1
Note : Perl Programmers Reference Guide

NAMESwitch − A switch statement for Perl

VERSIONThis document describes version 2.14 of Switch, released Dec 29, 2008.

SYNOPSIS​ use Switch; ​ ​ switch ($val) { ​ case 1 { print "number 1" } ​ case "a" { print "string a" } ​ case [1..10,42] { print "number in list" } ​ case (\@array) { print "number in list" } ​ case /\w+/ { print "pattern" } ​ case qr/\w+/ { print "pattern" } ​ case (\%hash) { print "entry in hash" } ​ case (\&sub) { print "arg to subroutine" } ​ else { print "previous case not true" }}

BACKGROUND[Skip ahead to DESCRIPTION if you don't care about the whys and wherefores of this control structure] In seeking to devise a Swiss Army case mechanism suitable for Perl, it is useful to generalize this notion of distributed conditional testing as far as possible. Specifically, the concept of matching between the switch value and the various case values need not be restricted to numeric (or string or referential) equality, as it is in other languages. Indeed, as Table 1 illustrates, Perl offers at least eighteen different ways in which two values could generate a match. ​ Table 1: Matching a switch value ($s) with a case value ($c) ​ ​ Switch Case Type of Match Implied Matching Code ​ Value Value ​ ====== ===== ===================== ============= ​ ​ number same numeric or referential match if $s == $c; ​ or ref equality ​ ​ object method result of method call match if $s−>$c(); ​ ref name match if defined $s−>$c(); ​ or ref ​ ​ other other string equality match if $s eq $c; ​ non−ref non−ref ​ scalar scalar ​ ​ string regexp pattern match match if $s =~ /$c/; ​ ​ array scalar array entry existence match if 0<=$c && $c<@$s; ​ ref array entry definition match if defined $s−>[$c]; ​ array entry truth match if $s−>[$c]; ​ ​ array array array intersection match if intersects(@$s, @$c); ​ ref ref (apply this table to ​ all pairs of elements ​ $s−>[$i] and ​ $c−>[$j]) ​ ​ array regexp array grep match if grep /$c/, @$s; ​ ref ​ ​ hash scalar hash entry existence match if exists $s−>{$c}; ​ ref hash entry definition match if defined $s−>{$c}; ​ hash entry truth match if $s−>{$c}; ​ ​ hash regexp hash grep match if grep /$c/, keys %$s; ​ ref ​ ​ sub scalar return value defn match if defined $s−>($c); ​ ref return value truth match if $s−>($c); ​ ​ sub array return value defn match if defined $s−>(@$c); ​ ref ref return value truth match if $s−>(@$c); In reality, Table 1 covers 31 alternatives, because only the equality and intersection tests are commutative; in all other cases, the roles of the $s and $c variables could be reversed to produce a different test. For example, instead of testing a single hash for the existence of a series of keys (\*(C`match if exists $s\->{$c}\*(C'\fR), one could test for the existence of a single key in a series of hashes (\*(C`match if exists $c\->{$s}\*(C'\fR).

DESCRIPTIONThe Switch.pm module implements a generalized case mechanism that covers most (but not all) of the numerous possible combinations of switch and case values described above. The module augments the standard Perl syntax with two new control statements: \*(C`switch\*(C'\fR and \f(CW\*(C`case\*(C'\fR. The \f(CW\*(C`switch\*(C'\fR statement takes a single scalar argument of any type, specified in parentheses. ​\*(C`switch\*(C'\fR stores this value as the current switch value in a (localized) control variable. The value is followed by a block which may contain one or more Perl statements (including the \*(C`case\*(C'\fR statement described below). The block is unconditionally executed once the switch value has been cached. A \*(C`case\*(C'\fR statement takes a single scalar argument (in mandatory parentheses if it's a variable; otherwise the parens are optional) and selects the appropriate type of matching between that argument and the current switch value. The type of matching used is determined by the respective types of the switch value and the \*(C`case\*(C'\fR argument, as specified in Table 1. If the match is successful, the mandatory block associated with the \*(C`case\*(C'\fR statement is executed. In most other respects, the \*(C`case\*(C'\fR statement is semantically identical to an \*(C`if\*(C'\fR statement. For example, it can be followed by an \f(CW\*(C`else\*(C'\fR clause, and can be used as a postfix statement qualifier. However, when a \*(C`case\*(C'\fR block has been executed control is automatically transferred to the statement after the immediately enclosing \*(C`switch\*(C'\fR block, rather than to the next statement within the block. In other words, the success of any \*(C`case\*(C'\fR statement prevents other cases in the same scope from executing. But see Allowing fall-through below. Together these two new statements provide a fully generalized case mechanism: ​ use Switch; ​ ​ # AND LATER... ​ ​ %special = ( woohoo => 1, d'oh => 1 ); ​ ​ while (<>) { ​ chomp; ​ switch ($_) { ​ case (%special) { print "homer\n"; } # if $special{$_} ​ case /[a−z]/i { print "alpha\n"; } # if $_ =~ /a−z/i ​ case [1..9] { print "small num\n"; } # if $_ in [1..9] ​ case { $_[0] >= 10 } { print "big num\n"; } # if $_ >= 10 ​ print "must be punctuation\n" case /\W/; # if $_ ~= /\W/ ​ }} Note that \*(C`switch\*(C'\fRes can be nested within \f(CW\*(C`case\*(C'\fR (or any other) blocks, and a series of \*(C`case\*(C'\fR statements can try different types of matches ​\*(-- hash membership, pattern match, array intersection, simple equality, etc. \*(-- against the same switch value. The use of intersection tests against an array reference is particularly useful for aggregating integral cases: ​ sub classify_digit ​ { ​ switch ($_[0]) { case 0 { return 'zero' } ​ case [2,4,6,8] { return 'even' } ​ case [1,3,5,7,9] { return 'odd' } ​ case /[A−F]/i { return 'hex' }}}

Allowing fall-throughFall-though (trying another case after one has already succeeded) is usually a Bad Idea in a switch statement. However, this is Perl, not a police state, so there is a way to do it, if you must. If a \*(C`case\*(C'\fR block executes an untargeted \f(CW\*(C`next\*(C'\fR, control is immediately transferred to the statement after the \*(C`case\*(C'\fR statement (i.e. usually another case), rather than out of the surrounding ​\*(C`switch\*(C'\fR block. For example: ​ switch ($val) { ​ case 1 { handle_num_1(); next } # and try next case... ​ case "1" { handle_str_1(); next } # and try next case... ​ case [0..9] { handle_num_any(); } # and we're done ​ case /\d/ { handle_dig_any(); next } # and try next case... ​ case /.*/ { handle_str_any(); next } # and try next case... ​ } If $val held the number 1, the above \*(C`switch\*(C'\fR block would call the first three \*(C`handle_...\*(C'\fR subroutines, jumping to the next case test each time it encountered a \*(C`next\*(C'\fR. After the third \f(CW\*(C`case\*(C'\fR block was executed, control would jump to the end of the enclosing ​\*(C`switch\*(C'\fR block. On the other hand, if $val held 10, then only the last two \*(C`handle_...\*(C'\fR subroutines would be called. Note that this mechanism allows the notion of conditional fall-through. For example: ​ switch ($val) { ​ case [0..9] { handle_num_any(); next if $val < 7; } ​ case /\d/ { handle_dig_any(); }} If an untargeted \*(C`last\*(C'\fR statement is executed in a case block, this immediately transfers control out of the enclosing \*(C`switch\*(C'\fR block (in other words, there is an implicit \*(C`last\*(C'\fR at the end of each normal \*(C`case\*(C'\fR block). Thus the previous example could also have been written: ​ switch ($val) { ​ case [0..9] { handle_num_any(); last if $val >= 7; next; } ​ case /\d/ { handle_dig_any(); }}

Automating fall-throughIn situations where case fall-through should be the norm, rather than an exception, an endless succession of terminal \*(C`next\*(C'\fRs is tedious and ugly. Hence, it is possible to reverse the default behaviour by specifying the string fallthrough when importing the module. For example, the following code is equivalent to the first example in Allowing fall-through: ​ use Switch 'fallthrough'; ​ ​ switch ($val) { ​ case 1 { handle_num_1(); } ​ case "1" { handle_str_1(); } ​ case [0..9] { handle_num_any(); last } ​ case /\d/ { handle_dig_any(); } ​ case /.*/ { handle_str_any(); }} Note the explicit use of a \*(C`last\*(C'\fR to preserve the non-fall-through behaviour of the third case.

Alternative syntaxPerl 6 will provide a built-in switch statement with essentially the same semantics as those offered by Switch.pm, but with a different pair of keywords. In Perl 6 \*(C`switch\*(C'\fR will be spelled \f(CW\*(C`given\*(C'\fR, and ​\*(C`case\*(C'\fR will be pronounced \f(CW\*(C`when\*(C'\fR. In addition, the \f(CW\*(C`when\*(C'\fR statement will not require switch or case values to be parenthesized. This future syntax is also (largely) available via the Switch.pm module, by importing it with the argument "Perl6". For example: ​ use Switch 'Perl6'; ​ ​ given ($val) { ​ when 1 { handle_num_1(); } ​ when ($str1) { handle_str_1(); } ​ when [0..9] { handle_num_any(); last } ​ when /\d/ { handle_dig_any(); } ​ when /.*/ { handle_str_any(); } ​ default { handle anything else; }} Note that scalars still need to be parenthesized, since they would be ambiguous in Perl 5. Note too that you can mix and match both syntaxes by importing the module with: ​ use Switch 'Perl5', 'Perl6';

Higher-order OperationsOne situation in which \*(C`switch\*(C'\fR and \f(CW\*(C`case\*(C'\fR do not provide a good substitute for a cascaded \*(C`if\*(C'\fR, is where a switch value needs to be tested against a series of conditions. For example: ​ sub beverage { ​ switch (shift) { ​ case { $_[0] < 10 } { return 'milk' } ​ case { $_[0] < 20 } { return 'coke' } ​ case { $_[0] < 30 } { return 'beer' } ​ case { $_[0] < 40 } { return 'wine' } ​ case { $_[0] < 50 } { return 'malt' } ​ case { $_[0] < 60 } { return 'Moet' } ​ else { return 'milk' }}} (This is equivalent to writing \*(C`case (sub { $_[0] < 10 })\*(C'\fR, etc.; \f(CW$_[0]\fR is the argument to the anonymous subroutine.) The need to specify each condition as a subroutine block is tiresome. To overcome this, when importing Switch.pm, a special placeholder subroutine named \*(C`_\|_\*(C'\fR [sic] may also be imported. This subroutine converts (almost) any expression in which it appears to a reference to a higher-order function. That is, the expression: ​ use Switch '_ _'; ​ ​ _ _ < 2 is equivalent to: ​ sub { $_[0] < 2 } With \*(C`_\|_\*(C'\fR, the previous ugly case statements can be rewritten: ​ case _ _ < 10 { return 'milk' } ​ case _ _ < 20 { return 'coke' } ​ case _ _ < 30 { return 'beer' } ​ case _ _ < 40 { return 'wine' } ​ case _ _ < 50 { return 'malt' } ​ case _ _ < 60 { return 'Moet' } ​ else { return 'milk' } The \*(C`_\|_\*(C'\fR subroutine makes extensive use of operator overloading to perform its magic. All operations involving _ _ are overloaded to produce an anonymous subroutine that implements a lazy version of the original operation. The only problem is that operator overloading does not allow the boolean operators \*(C`&&\*(C'\fR and \f(CW\*(C`||\*(C'\fR to be overloaded. So a case statement like this: ​ case 0 <= _ _ && _ _ < 10 { return 'digit' } doesn't act as expected, because when it is executed, it constructs two higher order subroutines and then treats the two resulting references as arguments to \*(C`&&\*(C'\fR: ​ sub { 0 <= $_[0] } && sub { $_[0] < 10 } This boolean expression is inevitably true, since both references are non-false. Fortunately, the overloaded 'bool' operator catches this situation and flags it as an error.

DEPENDENCIESThe module is implemented using Filter::Util::Call and Text::Balanced and requires both these modules to be installed.

AUTHORDamian Conway (damian@conway.org). This module is now maintained by Rafael Garcia-Suarez (rgarciasuarez@gmail.com) and more generally by the Perl 5 Porters (perl5−porters@perl.org), as part of the Perl core.

BUGSThere are undoubtedly serious bugs lurking somewhere in code this funky :−) Bug reports and other feedback are most welcome.

LIMITATIONSDue to the heuristic nature of Switch.pm's source parsing, the presence of regexes with embedded newlines that are specified with raw \*(C`/.../\*(C'\fR delimiters and don't have a modifier \*(C`//x\*(C'\fR are indistinguishable from code chunks beginning with the division operator \*(C`/\*(C'\fR. As a workaround you must use \*(C`m/.../\*(C'\fR or \f(CW\*(C`m?...?\*(C'\fR for such patterns. Also, the presence of regexes specified with raw \*(C`?...?\*(C'\fR delimiters may cause mysterious errors. The workaround is to use \*(C`m?...?\*(C'\fR instead. Due to the way source filters work in Perl, you can't use Switch inside an string \*(C`eval\*(C'\fR. If your source file is longer then 1 million characters and you have a switch statement that crosses the 1 million (or 2 million, etc.) character boundary you will get mysterious errors. The workaround is to use smaller source files.

COPYRIGHT​ Copyright (c) 1997−2008, Damian Conway. All Rights Reserved. ​ This module is free software. It may be used, redistributed ​ and/or modified under the same terms as Perl itself.
0
Johanes Gumabo
Data Size   :   47,676 byte
man-Switch.3pmBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 191,418
Visitor ID   :     :  
Visitor IP   :   3.145.2.6   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|249|Switch.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|149|Switch.3pm|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|249|Switch.3pm|41|br══─}─══|'br══─}─══ )         (htmlprn|149|Switch.3pm|41|'br══─}─══ |'br══─}─══ )         (rof_nr_x|149|Switch.3pm|51/52|\nF|.ie \nF ══─{─══. de IX )         (rof_unit_scale_px|41|Switch.3pm|51/52|F|.ie \nF ══─{─══. de IX )         (rof_if|19|Switch.3pm|51/52|\nF|.ie \nF ══─{─══. de IX )         (htmlprn|149|Switch.3pm|51/52|.ie \nF ══─{─══. de IX|.ie \nF ══─{─══. de IX )         (rof_escape_sequence|91|Switch.3pm|53|\$1\t\\n%\t"\\$2" |. tm Index:\\$1\t\\n%\t"\\$2" )         (parse_manual_page_|249|Switch.3pm|57|══─}─══|.══─}─══ )         (htmlprn|149|Switch.3pm|57|.══─}─══ |.══─}─══ )         (rof_escape_sequence|91|Switch.3pm|220|\*(C`match if exists $s\->{$c}\*(C'\fR), |the existence of a series of keys (\f(CW\*(C`match if exists $s\->{$c}\*(C'\fR), )         (rof_escape_sequence|91|Switch.3pm|222|\*(C`match if exists $c\->{$s}\*(C'\fR). |(\f(CW\*(C`match if exists $c\->{$s}\*(C'\fR). )         (rof_escape_sequence|91|Switch.3pm|230|\*(C`switch\*(C'\fR and \f(CW\*(C`case\*(C'\fR. The \f(CW\*(C`switch\*(C'\fR statement takes a |statements: \f(CW\*(C`switch\*(C'\fR and \f(CW\*(C`case\*(C'\fR. The \f(CW\*(C`switch\*(C'\fR statement takes a )         (rof_escape_sequence|91|Switch.3pm|232|\*(C`switch\*(C'\fR stores this value as the |\&\f(CW\*(C`switch\*(C'\fR stores this value as the )         (rof_escape_sequence|91|Switch.3pm|235|\*(C`case\*(C'\fR statement described below). |Perl statements (including the \f(CW\*(C`case\*(C'\fR statement described below). )         (rof_escape_sequence|91|Switch.3pm|239|\*(C`case\*(C'\fR statement takes a single scalar argument (in mandatory |A \f(CW\*(C`case\*(C'\fR statement takes a single scalar argument (in mandatory )         (rof_escape_sequence|91|Switch.3pm|243|\*(C`case\*(C'\fR argument, as |respective types of the switch value and the \f(CW\*(C`case\*(C'\fR argument, as )         (rof_escape_sequence|91|Switch.3pm|245|\*(C`case\*(C'\fR statement is executed. |block associated with the \f(CW\*(C`case\*(C'\fR statement is executed. )         (rof_escape_sequence|91|Switch.3pm|247|\*(C`case\*(C'\fR statement is semantically identical |In most other respects, the \f(CW\*(C`case\*(C'\fR statement is semantically identical )         (rof_escape_sequence|91|Switch.3pm|248|\*(C`if\*(C'\fR statement. For example, it can be followed by an \f(CW\*(C`else\*(C'\fR |to an \f(CW\*(C`if\*(C'\fR statement. For example, it can be followed by an \f(CW\*(C`else\*(C'\fR )         (rof_escape_sequence|91|Switch.3pm|251|\*(C`case\*(C'\fR block has been executed control is automatically |However, when a \f(CW\*(C`case\*(C'\fR block has been executed control is automatically )         (rof_escape_sequence|91|Switch.3pm|252|\*(C`switch\*(C'\fR |transferred to the statement after the immediately enclosing \f(CW\*(C`switch\*(C'\fR )         (rof_escape_sequence|91|Switch.3pm|254|\*(C`case\*(C'\fR statement prevents other cases in the |words, the success of any \f(CW\*(C`case\*(C'\fR statement prevents other cases in the )         (rof_escape_sequence|91|Switch.3pm|279|\*(C`switch\*(C'\fRes can be nested within \f(CW\*(C`case\*(C'\fR (or any other) blocks, |Note that \f(CW\*(C`switch\*(C'\fRes can be nested within \f(CW\*(C`case\*(C'\fR (or any other) blocks, )         (rof_escape_sequence|91|Switch.3pm|280|\*(C`case\*(C'\fR statements can try different types of matches |and a series of \f(CW\*(C`case\*(C'\fR statements can try different types of matches )         (rof_escape_sequence|91|Switch.3pm|281|\*(-- hash membership, pattern match, array intersection, simple equality, |\&\*(-- hash membership, pattern match, array intersection, simple equality, )         (rof_escape_sequence|91|Switch.3pm|282|\*(-- against the same switch value. |etc. \*(-- against the same switch value. )         (rof_escape_sequence|91|Switch.3pm|303|\*(C`case\*(C'\fR block executes an untargeted \f(CW\*(C`next\*(C'\fR, control is |If a \f(CW\*(C`case\*(C'\fR block executes an untargeted \f(CW\*(C`next\*(C'\fR, control is )         (rof_escape_sequence|91|Switch.3pm|304|\*(C`case\*(C'\fR statement |immediately transferred to the statement \fIafter\fR the \f(CW\*(C`case\*(C'\fR statement )         (rof_escape_sequence|91|Switch.3pm|306|\*(C`switch\*(C'\fR block. |\&\f(CW\*(C`switch\*(C'\fR block. )         (rof_escape_sequence|91|Switch.3pm|320|\*(C`switch\*(C'\fR block would call the |If \f(CW$val\fR held the number \f(CW1\fR, the above \f(CW\*(C`switch\*(C'\fR block would call the )         (rof_escape_sequence|91|Switch.3pm|321|\*(C`handle_...\*(C'\fR subroutines, jumping to the next case test |first three \f(CW\*(C`handle_...\*(C'\fR subroutines, jumping to the next case test )         (rof_escape_sequence|91|Switch.3pm|322|\*(C`next\*(C'\fR. After the third \f(CW\*(C`case\*(C'\fR block |each time it encountered a \f(CW\*(C`next\*(C'\fR. After the third \f(CW\*(C`case\*(C'\fR block )         (rof_escape_sequence|91|Switch.3pm|324|\*(C`switch\*(C'\fR block. |\&\f(CW\*(C`switch\*(C'\fR block. )         (rof_escape_sequence|91|Switch.3pm|326|\*(C`handle_...\*(C'\fR |On the other hand, if \f(CW$val\fR held \f(CW10\fR, then only the last two \f(CW\*(C`handle_...\*(C'\fR )         (rof_escape_sequence|91|Switch.3pm|339|\*(C`last\*(C'\fR statement is executed in a case block, this |If an untargeted \f(CW\*(C`last\*(C'\fR statement is executed in a case block, this )         (rof_escape_sequence|91|Switch.3pm|340|\*(C`switch\*(C'\fR block |immediately transfers control out of the enclosing \f(CW\*(C`switch\*(C'\fR block )         (rof_escape_sequence|91|Switch.3pm|341|\*(C`last\*(C'\fR at the end of each |(in other words, there is an implicit \f(CW\*(C`last\*(C'\fR at the end of each )         (rof_escape_sequence|91|Switch.3pm|342|\*(C`case\*(C'\fR block). Thus the previous example could also have been |normal \f(CW\*(C`case\*(C'\fR block). Thus the previous example could also have been )         (rof_escape_sequence|91|Switch.3pm|354|\*(C`next\*(C'\fRs is tedious and ugly. |exception, an endless succession of terminal \f(CW\*(C`next\*(C'\fRs is tedious and ugly. )         (rof_escape_sequence|91|Switch.3pm|371|\*(C`last\*(C'\fR to preserve the non-fall-through |Note the explicit use of a \f(CW\*(C`last\*(C'\fR to preserve the non-fall-through )         (rof_escape_sequence|91|Switch.3pm|377|\*(C`switch\*(C'\fR will be spelled \f(CW\*(C`given\*(C'\fR, and |pair of keywords. In Perl 6 \f(CW\*(C`switch\*(C'\fR will be spelled \f(CW\*(C`given\*(C'\fR, and )         (rof_escape_sequence|91|Switch.3pm|378|\*(C`case\*(C'\fR will be pronounced \f(CW\*(C`when\*(C'\fR. In addition, the \f(CW\*(C`when\*(C'\fR statement |\&\f(CW\*(C`case\*(C'\fR will be pronounced \f(CW\*(C`when\*(C'\fR. In addition, the \f(CW\*(C`when\*(C'\fR statement )         (rof_escape_sequence|91|Switch.3pm|408|\*(C`switch\*(C'\fR and \f(CW\*(C`case\*(C'\fR do not provide a good |One situation in which \f(CW\*(C`switch\*(C'\fR and \f(CW\*(C`case\*(C'\fR do not provide a good )         (rof_escape_sequence|91|Switch.3pm|409|\*(C`if\*(C'\fR, is where a switch value needs to |substitute for a cascaded \f(CW\*(C`if\*(C'\fR, is where a switch value needs to )         (rof_escape_sequence|91|Switch.3pm|426|\*(C`case (sub { $_[0] < 10 })\*(C'\fR, etc.; \f(CW$_[0]\fR |(This is equivalent to writing \f(CW\*(C`case (sub { $_[0] < 10 })\*(C'\fR, etc.; \f(CW$_[0]\fR )         (rof_escape_sequence|91|Switch.3pm|431|\*(C`_\|_\*(C'\fR [sic] may also be imported. This subroutine |subroutine named \f(CW\*(C`_\|_\*(C'\fR [sic] may also be imported. This subroutine )         (rof_escape_sequence|91|Switch.3pm|447|\*(C`_\|_\*(C'\fR, the previous ugly case statements can be rewritten: |With \f(CW\*(C`_\|_\*(C'\fR, the previous ugly case statements can be rewritten: )         (rof_escape_sequence|91|Switch.3pm|459|\*(C`_\|_\*(C'\fR subroutine makes extensive use of operator overloading to |The \f(CW\*(C`_\|_\*(C'\fR subroutine makes extensive use of operator overloading to )         (rof_escape_sequence|91|Switch.3pm|465|\*(C`&&\*(C'\fR and \f(CW\*(C`||\*(C'\fR to be overloaded. So a case statement |boolean operators \f(CW\*(C`&&\*(C'\fR and \f(CW\*(C`||\*(C'\fR to be overloaded. So a case statement )         (rof_escape_sequence|91|Switch.3pm|474|\*(C`&&\*(C'\fR: |and then treats the two resulting references as arguments to \f(CW\*(C`&&\*(C'\fR: )         (rof_escape_sequence|91|Switch.3pm|499|\*(C`/.../\*(C'\fR |regexes with embedded newlines that are specified with raw \f(CW\*(C`/.../\*(C'\fR )         (rof_escape_sequence|91|Switch.3pm|500|\*(C`//x\*(C'\fR are indistinguishable from |delimiters and don't have a modifier \f(CW\*(C`//x\*(C'\fR are indistinguishable from )         (rof_escape_sequence|91|Switch.3pm|501|\*(C`/\*(C'\fR. As a workaround |code chunks beginning with the division operator \f(CW\*(C`/\*(C'\fR. As a workaround )         (rof_escape_sequence|91|Switch.3pm|502|\*(C`m/.../\*(C'\fR or \f(CW\*(C`m?...?\*(C'\fR for such patterns. Also, the presence |you must use \f(CW\*(C`m/.../\*(C'\fR or \f(CW\*(C`m?...?\*(C'\fR for such patterns. Also, the presence )         (rof_escape_sequence|91|Switch.3pm|503|\*(C`?...?\*(C'\fR delimiters may cause mysterious |of regexes specified with raw \f(CW\*(C`?...?\*(C'\fR delimiters may cause mysterious )         (rof_escape_sequence|91|Switch.3pm|504|\*(C`m?...?\*(C'\fR instead. |errors. The workaround is to use \f(CW\*(C`m?...?\*(C'\fR instead. )         (rof_escape_sequence|91|Switch.3pm|507|\*(C`eval\*(C'\fR. |an string \f(CW\*(C`eval\*(C'\fR. )