Help for this page

Select Code to Download


  1. or download this
    my $string_to_find = 'hidden';
    my @array_to_search = qw(Foo whathiddenever Bar 12hidden456);
    
    say "Found $_" for grep {m/\Q$string_to_find/} @array_to_search;
    
  2. or download this
    say "Found $_" for grep {index($_, $string_to_find) > -1} @array_to_se
    +arch;