Help for this page

Select Code to Download


  1. or download this
    $ perl -MDevel::Peek -e'(my $x = "ababa") =~ m/a/g; print Dump($x);'
    SV = PVMG(0x7b65a0) at 0x786680
    ...
        MG_VIRTUAL = &PL_vtbl_mglob
        MG_TYPE = PERL_MAGIC_regex_global(g)
        MG_LEN = 1
    
  2. or download this
      my $x = "ababa";
      sub foo { \$x; }
      print join " ", @-, @+ while ${foo()} =~ m/a/g;