in reply to Using a regex function from a hash

Bad news: regexen and substitutions don't work that way.

Good news: if use an anonymous sub instead you can do what you want.

my %functions = ( "\\.vms" => sub { my $t = shift; $t =~ s{/}{}; $t } +);

Then call the sub when you get a match.

$data = $value->( $data );