Help for this page

Select Code to Download


  1. or download this
    splice @a, 0, 1;
    #          |  |
    #          |  +-- length
    #          +----- offset
    #
    
  2. or download this
    for (0..$#a) {
      if ($a[$_] eq 'a') {
    ...
              # the first match
      }
    }
    
  3. or download this
    @a = map { /a/ ? () : $_ } @a;