Help for this page

Select Code to Download


  1. or download this
    print "'F' is at index: $_\n" 
      for grep { $text[$_] eq 'F' } 0 .. $#text;
    
  2. or download this
    use List::MoreUtils qw( indexes );
    # ...
    print "'F' is at index: $_\n"
      for indexes { $_ eq 'F' } @text;