Help for this page

Select Code to Download


  1. or download this
       DB<102> my $i=0; @m= map { $_=~/xxx/ ? $i++ : () } @a
     => (0, 1, 2)
    
  2. or download this
      DB<104> my $i=-1; @m= map { $i++; $_=~/xxx/ ? $i :() } @a
     => (1, 4, 6)