use strict; use warnings; use Test::More tests => 1; my $in = 'foo .024. 3# bar'; my $want = 'foo bar'; my $try = $in; $try =~ s/\.024\. 3# \n//; is ($try, $want);