fork download
  1. use Data::Dumper;
  2. sub dd { print Dumper(shift) };
  3.  
  4. my @R = ();
  5.  
  6. ("aa2bb4cc6dd8" x 5e3) =~ /
  7. (?:
  8. (\w\w) (\d)
  9.  
  10. # push captures to @R:
  11. (?{ push @R, [$1, $2] })
  12. )*
  13. /x;
  14.  
  15. dd @R[ -1 ]
Success #stdin #stdout 0.06s 17576KB
stdin
Standard input is empty
stdout
$VAR1 = [
          'dd',
          '8'
        ];