Help for this page

Select Code to Download


  1. or download this
    if ($string =~ /${\(TEST)}/) {
    
  2. or download this
    use constant PATTERN => qr/def/;
    if ($string =~ PATTERN) { ... }
    
  3. or download this
    use constant PATTERN => 'def';
    my $regex = qr/${\(PATTERN)}/; #options such as /m can go here.
    if ($string =~ regex) { ... }