It's basically what I'd do too. I'd just construct the regex myself I guess.
Something along the lines of:
my $match = '('.join( '|', sort keys %replace ).')';
and then use the value in $replace{$1}
In reply to Re^2: Testing for the presence of a hash key in a filename
by Ojosh!ro
in thread Testing for the presence of a hash key in a filename
by NovMonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |