~/perl/test> cat tr_vs_s2.pl #!/usr/bin/perl use Benchmark qw(:all); my $string = 'Hallo, Welt blub blub, foo, bar.' x 10_000; cmpthese( 10_000, {    'regex' => sub { (my $new = $string) =~ s/,//g; },    'trans' => sub { (my $new = $string) =~ tr/,//d }, }); ~/perl/test> perl tr_vs_s2.pl        Rate regex trans regex 66.7/s    --  -78% trans  300/s  350%    --