Help for this page

Select Code to Download


  1. or download this
    chomp( (undef, $_, undef, @words) = <> );
    
    ...
    pop @submatches;
    
    print join ' ', map { $restore_case{ scalar reverse } } @submatches
    
  2. or download this
    m/^ 
        (?: 
    ...
            # $^N - last captured group
        )+ 
    $/x;
    
  3. or download this
    ":aa2bb4cc6dd8" =~ / (:)
                         (?{ [] })   # initialize $^R
    ...
                             (?{ [@{$^R}, [$2, $3]] })
                         )*
                       /x;
    
  4. or download this
    my @R;
    ":aa2bb4cc6dd8" =~ / (:)
    ...
                             (?{ push @R, [$2, $3] })
                         )*
                       /x;
    
  5. or download this
    use Data::Dumper;
    sub dd { print Dumper(shift) };
    ...
                       /x;
                       
    dd @{ $^R }[ -1 ]
    
  6. or download this
    use Data::Dumper;
    sub dd { print Dumper(shift) };
    ...
                       /x;
                       
    dd @R[ -1 ]
    
  7. or download this
    $VAR1 = [
              'dd',
              '8'
            ];