my @matches = grep { $file[$_] =~ /^\Q$storeline|\E/ } 0..$#file; #### my @matches = grep { /^\Q$storeline|\E/ } @file;