Help for this page

Select Code to Download


  1. or download this
    $pat = qr/PAT/;
    
  2. or download this
    $pat = q/PAT/;
    
  3. or download this
    $pat = 'PAT';
    
  4. or download this
    $pat = '(?x:foo bar)';  # Works fine
    
  5. or download this
    my $pat1 = 'PAT1';
    my $pat2 = 'PAT2';
    $str =~ /$pat1$pat2/;
    
  6. or download this
    my $pat1 = qr/PAT1/;
    my $pat2 = qr/PAT2/;
    $str =~ /$PAT1$PAT2/;