my @array = qw( John Jake and Jasper ); $_ = uc($_) for grep /^a/, @array; print("@array\n"); # John Jake AND Jasper