Yet another way to do it is to use a hash (which in OP's case seem out of proportion) ...
my $string = 'bulky axe'; my %map = ( 'a' => 2 , 'b' => 4 ); $string =~ s/$_/$map{ $_ }/g for keys %map;
And, Python may have a solution for your "white, ugly braces" problem.
In reply to Re: ugly code
by parv
in thread ugly code
by fubber
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |