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 );
In reply to Re: Using a regex function from a hash
by Fletch
in thread Using a regex function from a hash
by perlNinny
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |