my @m_h = map {(my $c = $_) =~ s/$this/$that/ig; $c } grep {/^t/i} @foo;