fork download
  1. my $aaa = "abcdefghi";
  2. my @bbb;
  3. my $i = 0;
  4.  
  5. @bbb = ($aaa =~ /([a-z]{3})/g);
  6. foreach my $p (@bbb){
  7. ++$i;
  8. print "[$i]$p";
  9. }
  10. print "\n";
Success #stdin #stdout 0s 3608KB
stdin
Standard input is empty
stdout
[1]abc[2]def[3]ghi