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