my $var = "test\n123"; $var =~ s!t!!; print $var,"\n"; $var = "test\n123"; $var =~ s!t!!g; print $var,"\n";