Help for this page

Select Code to Download


  1. or download this
    $ perl -wE 'my $re = qr{A}g'
    Unknown regexp modifier "/g" at -e line 1, near "= "
    Execution of -e aborted due to compilation errors.
    
  2. or download this
    $ perl -wE 'use re "/g"'
    Unknown regular expression flag "g" at -e line 1.
    
  3. or download this
    $ perl -wE 'my ($p, $f) = (A => "x"); my $re = qr{(?$f: $p )}; say $re
    +'
    (?^u:(?x: A ))
    
  4. or download this
    $ perl -wE 'qr{(?g:)}'
    Useless (?g) - use /g modifier in regex; marked by <-- HERE in m/(?g <
    +-- HERE :)/ at -e line 1.