use strict; use warnings; my $grepper = 'label("'; print "$grepper\n"; my @array = ("label(", "label"); my @LABEL = grep {/\Q$grepper\E/} @array; print ">@LABEL<\n";